Displaying 3 results from an estimated 3 matches for "mem_reserv".
Did you mean:
mem_reserve
2010 Sep 20
1
Dynamic forking in Win32
.../* allocate memory for the new EXE image at the
* prefered imagebase.
*/
v = VirtualAllocEx(
pi.hProcess,
(LPVOID)exe->peXH->imageBase,
imageSize,
MEM_RESERVE | MEM_COMMIT,
PAGE_EXECUTE_READWRITE);
if (v)
printf(
"Unmapped and Allocated Mem for New EXE at %X\n",
(uint)v);
}
}
if (!v && hasRelocationTable...
2006 Oct 23
0
Need some help with MMap# and MMap#=
...thought this was doable with VirtualAlloc, but I can''t seem to get it
to work:
def []=(offset, length, string)
if offset + length > @size
diff = offset + length - size
addr = [@address + diff + 1].pack(''L'')
if VirtualAlloc(addr, diff, MEM_COMMIT|MEM_RESERVE,
PAGE_READWRITE) == 0
raise Error, get_last_error
end
end
memcpy(@address + offset, string, string.length)
end
When I try this, however, I get:
C:/ruby/lib/ruby/site_ruby/1.8/windows/memory.rb:82:in `call'': NULL
pointer given (ArgumentError)
from C:/ruby/l...
2006 Aug 28
0
"Bus Error" Under Mac OS X x86 with Wine 0.9.20
..._wine_shared_heap+16638052>: 0x00000000
(gdb) print peb
$1 = (PEB *) 0x7ffde000
dlls/ntdll/thread.c:220-228 has this:
/* reserve space for shared user data */
addr = (void *)0x7ffe0000;
size = 0x10000;
NtAllocateVirtualMemory( NtCurrentProcess(), &addr, 0, &size,
MEM_RESERVE, PAGE_READONLY );
/* allocate and initialize the PEB */
addr = NULL;
size = sizeof(*peb);
NtAllocateVirtualMemory( NtCurrentProcess(), &addr, 1, &size,
MEM_COMMIT | MEM_TOP_DOWN, PAGE_READWRITE );
peb = addr;
peb->NumberOfProcessor...