editbin /heap
From: Karel Bijl (Bijl_at_discussions.microsoft.com)
Date: 02/17/05
- Next message: Randy Scarborough: "Re: PdhCollectQueryData won't collect data on WXP after SP2"
- Previous message: sharon.sahar_at_gmail.com: "Re: Video memory mapping - HOWTO?"
- Next in thread: Pavel Lebedinsky: "Re: editbin /heap"
- Reply: Pavel Lebedinsky: "Re: editbin /heap"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 17 Feb 2005 04:13:02 -0800
Hi,
I wonder what editbin /heap does.
According to the documention it sets the size of the heap, the total heap
allocation in virtual memory.
Then I would expect that by using HeapAlloc( GetProcessHeap() ... ) I would
be able to allocate memory from this heap.
But this doesn't seem to be the case!
The program below allocates 1.2 GB from the heap.
This program works fine without using editbin..
However if you do a editbin /heap:1500000000 (1.5 GB) it doesn't work! I
don't understand this.
It's almost as if the part that editbin /heap addresses is not the same heap
as returned by GetProcessHeap().
But if you do a HeapWalk( GetProcessHeap() ... ) you do see this huge 1.5 GB
block there.
How do I allocate memory from the heap that has been modified by editbin
/heap ?
[code]
int main(int argc, char* argv[])
{
size_t MB = 1024*1024;
void* p = NULL;
if( p = HeapAlloc( GetProcessHeap(), 0, 1200 * MB ) )
printf( "allocation success\n" );
else
printf( "allocation failure\n" );
...
}
[/code]
- Next message: Randy Scarborough: "Re: PdhCollectQueryData won't collect data on WXP after SP2"
- Previous message: sharon.sahar_at_gmail.com: "Re: Video memory mapping - HOWTO?"
- Next in thread: Pavel Lebedinsky: "Re: editbin /heap"
- Reply: Pavel Lebedinsky: "Re: editbin /heap"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|