Use Real 1GB and Fake 3GB Memory?

B

Bryan Parkoff

I work emulator project using 32 Bit emulated processor. The problem is
that it attempts to allocate 4GB memory because some people want to use
emulated instruction to read data from 4GB memory. It is always not
necessary because it can waste a lot of memory.
There is a way to create pointer list. Emulator project can only
allocate less than 1GB memory that it is always enough. One GB memory is a
real memory. Then, it can allocate only 64K memory which it is a fake
memory. Fake 64K memory can be mapped to 3GB memory while real 1GB memory
can be mapped to below 1GB memory. It is done through pointer list.
The best is to create pointer list that can only limit to 262,144 bytes
because pointer is only 4 bytes. 16384 pointer list can be mapped to real
1GB memory while 49152 pointer list can be mapped to fake 3GB memory. It is
used to map each 64K page only.
Please provide your opinion. Do you think that pointer list should be
enough to hold 262,144 bytes to map 4GB memory through 64K pages? If you
want only 4K bytes in page or 256 bytes in page, pointer list will enlarge
to 1MB for 4K byte in this page and 16MB for 256 bytes in this page. It is
how large pointer list can waste a lot of memory. Do you think that pointer
list with 262,144 bytes should be enough?

Thanks...
Bryan Parkoff
 
V

Victor Bazarov

Bryan said:
I work emulator project using 32 Bit emulated processor. The problem is
that it attempts to allocate 4GB memory because [...]
Please provide your opinion. Do you think that pointer list should be
enough to hold 262,144 bytes to map 4GB memory through 64K pages? [...]

Is there a C++ language question I am not seeing here? I am genuinely
curious because I thought I understood the topicality as it applied to
comp.lang.c++, and I am starting to doubt myself.

Thanks.

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top