Archived

This topic is now archived and is closed to further replies.

memory allocation

This topic is 5672 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

GlobalAlloc and LocalAlloc are only included for compatability with 16-bit versions of Windows. If you''re building a Win32 app, you should use HeapAlloc, despite how much of a pain it can be at times.

As far as I know, there is no particular difference in speed, but that said, I''ve never timed it...

Share this post


Link to post
Share on other sites
If you look at the source for malloc it calls HeapAlloc internally (well, on windows it does, there''s probably some other system call on other platforms).

The basic point is that malloc, free, new and delete are portable, while HeapAlloc & co. are not.


codeka.com - Just click it.

Share this post


Link to post
Share on other sites