The system uses memory from the private heap to store heap support structures, so not all of the specified heap size is available to the process. For example, if the HeapAlloc function requests 64 kilobytes (K) from a heap with a maximum size of 64K, the request may fail because of system overhead.

When I need 64K i create 64K heap what is the point in making HeapCreate function if u dont know if memory u reserved can be used ??


Can u tell me how much need to be reserved to obtain for example 40K ??
Posted on 2003-05-27 13:22:09 by AceEmbler
Specify 0, so the heap will grow as needed.
Posted on 2003-05-27 15:16:51 by iblis
Or specify a heap larger than you actually need, which is a good defensive progamming method to make sure you do not get Out Of Memory exceptions. You do have 4GB (theoretically) to play with you know, so don't try to be too tight :)
Posted on 2003-05-27 20:16:57 by sluggy
Since i decided to learn assembler i wont my progs to be the least resource consuming.And this function is just bothering me.
Posted on 2003-05-28 03:30:05 by AceEmbler
Specifying HEAP_NO_SERIALIZE flag with all heap calls make the heap-functions much faster I found out, but this flag also makes it impossible to make two threads call heap-functions for the same heap independantly.
But I never use two threads on a heap I created in a program so I never experienced trouble.
I also specify 0 to make the heap able to grow.
Posted on 2003-05-28 16:37:46 by david
HEAP_NO_SERIALIZE great i'm not gona use different thread.

3.5% alcohol <---- waht is this ur best record ??? :tongue: (ur still alive ??);)


Damn it i missed my 100 post
Posted on 2003-05-28 16:42:42 by AceEmbler

3.5% alcohol <---- waht is this ur best record ??? (ur still alive ??)


LOL that's funny :grin:

No, it is just the maximum alcohol percentage legal for beer you can buy in supermarket in my country. ( state got monopoly on selling alcohol and you can only buy better it in a special store for alcoholic beverages )
Anyways I love that beer 3.5% beer very much.
Posted on 2003-05-28 20:09:14 by david
:grin:
3.5% beer is like sex in a canoe, f*cking close to water !
Posted on 2003-05-28 20:28:53 by donkey