Click here to Skip to main content
16,018,460 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: I'm a bit overwhelmed Pin
honey the codewitch17-Aug-24 12:21
mvahoney the codewitch17-Aug-24 12:21 
GeneralRe: I'm a bit overwhelmed Pin
englebart14-Aug-24 15:44
professionalenglebart14-Aug-24 15:44 
GeneralRe: I'm a bit overwhelmed Pin
megaadam14-Aug-24 21:54
professionalmegaadam14-Aug-24 21:54 
GeneralRe: I'm a bit overwhelmed Pin
honey the codewitch14-Aug-24 22:07
mvahoney the codewitch14-Aug-24 22:07 
GeneralRe: I'm a bit overwhelmed Pin
megaadam14-Aug-24 22:48
professionalmegaadam14-Aug-24 22:48 
GeneralRe: I'm a bit overwhelmed Pin
honey the codewitch14-Aug-24 23:17
mvahoney the codewitch14-Aug-24 23:17 
GeneralRe: I'm a bit overwhelmed Pin
megaadam15-Aug-24 3:09
professionalmegaadam15-Aug-24 3:09 
GeneralRe: I'm a bit overwhelmed Pin
honey the codewitch15-Aug-24 4:12
mvahoney the codewitch15-Aug-24 4:12 
I actually am doing something similar.
Here's my structure:

C++
typedef struct {
    int accessed;
    gfx::size16 dimensions;
    uint8_t* data;
} cache_entry_t;


Accessed just supports the LRU. The data is malloc'd and I thought that was causing my problem so I was going to create a simple "vector" to hold all the bytes for every entry, kind of like a private heap, but then I discovered a memory leak.

I fixed the leak, and my problems went away.

I did not expect a leak. I'm usually fastidious about free'ing what I allocate.

In fact, I type free() at the same time as malloc() so I don't forget.

Well, I forgot, apparently.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix

GeneralRe: I'm a bit overwhelmed Pin
megaadam15-Aug-24 3:22
professionalmegaadam15-Aug-24 3:22 
GeneralRe: I'm a bit overwhelmed Pin
Gary Wheeler15-Aug-24 7:22
Gary Wheeler15-Aug-24 7:22 
GeneralRe: I'm a bit overwhelmed Pin
honey the codewitch15-Aug-24 9:29
mvahoney the codewitch15-Aug-24 9:29 
GeneralRe: I'm a bit overwhelmed Pin
Gary Wheeler16-Aug-24 0:12
Gary Wheeler16-Aug-24 0:12 
GeneralI have spent most of this morning trying to add a reference to a VS solution. Pin
OriginalGriff13-Aug-24 1:30
mveOriginalGriff13-Aug-24 1:30 
GeneralRe: I have spent most of this morning trying to add a reference to a VS solution. Pin
BernardIE531713-Aug-24 1:36
BernardIE531713-Aug-24 1:36 
GeneralRe: I have spent most of this morning trying to add a reference to a VS solution. Pin
RickZeeland13-Aug-24 2:45
mveRickZeeland13-Aug-24 2:45 
GeneralEmbedded and legacy rabbit holes Pin
honey the codewitch12-Aug-24 21:12
mvahoney the codewitch12-Aug-24 21:12 
GeneralRe: Embedded and legacy rabbit holes Pin
pkfox12-Aug-24 21:49
professionalpkfox12-Aug-24 21:49 
GeneralRe: Embedded and legacy rabbit holes Pin
honey the codewitch12-Aug-24 22:03
mvahoney the codewitch12-Aug-24 22:03 
GeneralRe: Embedded and legacy rabbit holes Pin
englebart14-Aug-24 15:56
professionalenglebart14-Aug-24 15:56 
GeneralRe: Embedded and legacy rabbit holes Pin
honey the codewitch14-Aug-24 15:57
mvahoney the codewitch14-Aug-24 15:57 
GeneralWordle 1,151 Pin
Shane010312-Aug-24 17:57
Shane010312-Aug-24 17:57 
GeneralRe: Wordle 1,151 Pin
GKP199212-Aug-24 18:52
professionalGKP199212-Aug-24 18:52 
GeneralRe: Wordle 1,151 Pin
OriginalGriff12-Aug-24 19:05
mveOriginalGriff12-Aug-24 19:05 
GeneralRe: Wordle 1,151 - 3 4 me Pin
pkfox12-Aug-24 20:34
professionalpkfox12-Aug-24 20:34 
GeneralRe: Wordle 1,151 - 3 4 me Pin
ChandraRam12-Aug-24 23:14
ChandraRam12-Aug-24 23:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.