Re: how can I allocate memory in address 0x4800 0000 (virtual)



It's strange: when I allocate a memory of size 0x3456790(PAGE_NOACCESS)
at this address, it's successful; but when I allocate the same size of
memory at 0x2000 0000, it fails.

Why?

K. S. Huang wrote:
Do you mean you want to allocate some memory in Shared Memory Range?
If you call VirtualAlloc with dwSize >= 2 MB, flAllocationType set to
MEM_RESERVE, and flProtect set to PAGE_NOACCESS, it automatically reserves
memory at the shared memory region. This preserves per-process virtual
memory.


<yuanfei.work@xxxxxxxxx>
???????:1167127457.777869.137920@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
It looks malloc did not allocate memory in that adressrange.

thanks


.



Relevant Pages

  • Tru64 issues with Infinite limits
    ... An automated test in my nightly build was failing due to Out of Memory ... Cannot allocate block 146 ...
    (comp.unix.tru64)
  • Re: run-time vs compile-time
    ... > offset related to some location (like stack base) somewhere. ... > offset from heap to pi. ... When you allocate an int on the heap, it is allocated at address 1. ... application has a given amount of memory it can use as it wishes. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: run-time vs compile-time
    ... > offset related to some location (like stack base) somewhere. ... > offset from heap to pi. ... When you allocate an int on the heap, it is allocated at address 1. ... application has a given amount of memory it can use as it wishes. ...
    (comp.lang.cpp)
  • Re: SBCL performance on OS X
    ... > than C at allocating memory. ... > OpenMCL on the powerbook is an order of magnitude slower than SBCL ... comparison with the lisp implementation of your experiment terribly ... allocate an extra two-word structure to store it in, ...
    (comp.lang.lisp)
  • Re: Sharing memory between kernelspace and userspace
    ... deallocate, on a totally dynamic basis, userspace ... Let userspace allocate shared memory visible to multiple ... and pass that into the kernel for it to write to. ...
    (Linux-Kernel)