G
Guest
Greetings,
We are trying to use the Low Fragmentation Heap under XP Embedded SP2. We
use the code:
ULONG ulHeapCompatibilityInformation ;
ulHeapCompatibilityInformation = 2
if(HeapSetInformation(GetProcessHeap(),HeapCompatibilityInformation,&ulHeapCompatibilityInformation,
sizeof(ulHeapCompatibilityInformation))) {
OutputDebugString("Heap algorithm set to Low-fragmentation heap\n");
}
else
OutputDebugString("Heap algorithm NOT set to Low-fragmentation heap\n");
This always fails with GetLastError() returning a 31 (0x8007001f).
Afterwards, we do a HeapQueryInformation and the response is always 1.
Is the LFH valid in XPE?
Additionally, what is the maximum size of a heap? Our system seems to
generate 55 heaps shortly after starting, not sure where they are all coming
from. The main process heap runs out of memory after a few hours of running
and the system fails. We don't specify any heap sizes. Does a heap get
created for each thread? We have a lot of those that come and go. Also, how
does the type of heap get determined? When I do HeapQueryInformation each of
the heaps, some are type 0 and some type 1. None are type 2 (what we want).
Is there just a forum for Heap stuff?
Thanks
Rich.
We are trying to use the Low Fragmentation Heap under XP Embedded SP2. We
use the code:
ULONG ulHeapCompatibilityInformation ;
ulHeapCompatibilityInformation = 2
if(HeapSetInformation(GetProcessHeap(),HeapCompatibilityInformation,&ulHeapCompatibilityInformation,
sizeof(ulHeapCompatibilityInformation))) {
OutputDebugString("Heap algorithm set to Low-fragmentation heap\n");
}
else
OutputDebugString("Heap algorithm NOT set to Low-fragmentation heap\n");
This always fails with GetLastError() returning a 31 (0x8007001f).
Afterwards, we do a HeapQueryInformation and the response is always 1.
Is the LFH valid in XPE?
Additionally, what is the maximum size of a heap? Our system seems to
generate 55 heaps shortly after starting, not sure where they are all coming
from. The main process heap runs out of memory after a few hours of running
and the system fails. We don't specify any heap sizes. Does a heap get
created for each thread? We have a lot of those that come and go. Also, how
does the type of heap get determined? When I do HeapQueryInformation each of
the heaps, some are type 0 and some type 1. None are type 2 (what we want).
Is there just a forum for Heap stuff?
Thanks
Rich.