![]() |
|
|
|
#1
|
|||
|
|||
|
Thanx all
![]() Problem resolved with allocation big table and array of pointers - as koyaan says.These "chunks" are allocated structures in an symbol table - the part of compiler. Regards. Janus. |
|
#2
|
|||
|
|||
|
@gigaman:
About VirtualAlloc: dwSize in: Size of the region, in bytes. If the lpAddress parameter is NULL, this value is rounded up to the next page boundary. Otherwise, the allocated pages include all pages containing one or more bytes in the range from lpAddress to (lpAddress+dwSize). This means that a 2-byte range straddling a page boundary causes both pages to be included in the allocated region. so even if you allocate 1-byte using virtualAlloc, the system will reserve an entire page (4KB). |
|
#3
|
|||
|
|||
|
I know - but the original post didn't say how big these "chunks" are. I was just trying to get some more information. Of course, allocating a bigger piece of memory and doing your own handling of smaller memory allocation is better, just requires some additional work.
Btw, even for GlobalAlloc the documentaion says that bigger piece of memory than the requested one may be allocated. |
|
#4
|
|||
|
|||
|
MSDN discourages the use of GobalAlloc
maybe you should use the heap functions hxxp://msdn.microsoft.com/library/en-us/memory/base/heap_functions.asp |
![]() |
| Thread Tools | |
| Display Modes | |
|
|