flat assembler
Message board for the users of flat assembler.
Index
> Windows > VirtualAlloc trouble Goto page Previous 1, 2, 3 |
Author |
|
windwakr 21 Dec 2009, 02:14
Neat.
|
||||||||||
21 Dec 2009, 02:14 |
|
sinsi 21 Dec 2009, 02:37
64-bit
|
|||
21 Dec 2009, 02:37 |
|
blacky 24 Dec 2009, 02:59
heh that snippet should probably free it too before exiting.
(i know by default the system will free the memory, just saying) |
|||
24 Dec 2009, 02:59 |
|
revolution 24 Dec 2009, 03:15
blacky: Sure. But it is just simple test. Not worth the extra effort IMO.
|
|||
24 Dec 2009, 03:15 |
|
f0dder 25 Dec 2009, 14:46
Local/GlobalAlloc are indeed implemented on top of HeapAlloc, but use an undocumented allocation flag. Generally, don't bother with local/globalalloc in new code but use heapalloc, you'll save a few instruction cycles...
However, when dealing with things where MSDN explicitly specifies you should use local/globalalloc memory (clipboard, createstreamonhglobal), do stick with them - that little magic flag does make the allocation a slight bit different. Last time I dug into the issue (XP SP2, I think - but it's been enough years that it could have been Win2000) the local/globalalloc functions caused some 4 or 8 bytes of information to be prepended to the allocated memory. |
|||
25 Dec 2009, 14:46 |
|
Goto page Previous 1, 2, 3 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.