logoalt Hacker News

pcwalton • today at 7:48 PM • 1 reply • view on HN

Userland system DLLs need to allocate memory too.


Replies

irishcoffee • today at 8:35 PM

Whenever I write I library I don't allocate memory. If memory needs to be allocated, the program calling into the library allocates memory and passes a pointer (or reference I suppose) into the library call.

Clearly this can't be enforced, but I've always found it bad practice to allocate memory inside a library.

➕ show 1 reply