Displaying 4 results from an estimated 4 matches for "mem_commit".
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(exe->peXH)...
2006 Oct 23
0
Need some help with MMap# and MMap#=
...ap.close
I 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)
fro...
2006 Aug 28
0
"Bus Error" Under Mac OS X x86 with Wine 0.9.20
...10000;
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->NumberOfProcessors = 1;
At this point, I'm stumped. Is there something wrong with my portfile
that's causing problems? The only thing I can think of is that it's
using incompatible versions of libraries that Wine requires,...
2007 Oct 09
5
Playing with ReadFileScatter()
Hi all,
Looking at the IO.readlines source in io.c, it looks to me like they
grab 8k chunks, split on the input record separator, and buffer accordingly.
Since it looks like ReadFileScatter() does some of that work
automatically (in page file sized chunks), I thought I''d give it a try.
Here''s what I''ve got, but it doesn''t work. I have an incorrect parameter