![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, I'm desperatly trying to switch on the low-fragmentation heap for the crt heap in C++ in VS.NET 2003 on a Windows XP SP2 machine with the following code: ULONG HeapFragValue = 2; int ret = HeapSetInformation((HANDLE)_get_heap_handle(), HeapCompatibilityInformation, &HeapFragValue, sizeof(HeapFragValue)); It always returns 0 which means according to the documentation that it didn't succeeded. So I tried to create a new heap to test if it's a problem with the crt heap: HANDLE hh = HeapCreate(0, 0, 0); ULONG HeapFragValue = 2; int ret = HeapSetInformation(hh, HeapCompatibilityInformation, &HeapFragValue, sizeof(HeapFragValue)); This also returns 0. So what's the trick? Any hints are welcome. Ralf |
#3
| |||
| |||
|
|
Have you tried to use GetLastError and/or to see if HeapCreate fails for the second one ? HeapCreate succeeds and the error code for HeapSetInformation is 31: A |
|
(and I would try rather a group such as microsoft.public.dotnet.languages.vc). Good idea. Thanks. |
#4
| |||
| |||
|
#5
| |||
| |||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |