Forums

allocate 10 GB of memory dynamically

Started by karthikbg November 15, 2006
Hi,

I have 1 GB RAM (Physical Memory) and 90 GB Harddisk (Logical Memory).

Is it possible to allocate 5 GB of memory dynamically.

But Dynamic memory allocation depends on Heap that we have. I believe
that
heap cannot be allocated to have around 8 GB of memory. (But, some
tricks  must be there to
have around 8 GBs of Heap :) :) !! )

Kindly tell some tricks for assigning big amount ( 8 GB ) of Heap by
some tricks ?

Thx in advans,
Karthik Balaguru

karthikbg wrote:

> I have 1 GB RAM (Physical Memory) and 90 GB Harddisk (Logical Memory). > > Is it possible to allocate 5 GB of memory dynamically. > > But Dynamic memory allocation depends on Heap that we have. I believe > that > heap cannot be allocated to have around 8 GB of memory. (But, some > tricks must be there to > have around 8 GBs of Heap :) :) !! ) > > Kindly tell some tricks for assigning big amount ( 8 GB ) of Heap by > some tricks ?
Sure, use a 64 bit CPU and OS.
Hi,
How to do that Heap allocation for a Board baed on 32-Bit CPU and OS ?
( CPU cannot be changed at this stage :( .... !! )

Any tricks ?

Thx in advans,
Karthik Balaguru

karthikbg wrote:

> Hi, > How to do that Heap allocation for a Board baed on 32-Bit CPU and OS ? > ( CPU cannot be changed at this stage :( .... !! ) > > Any tricks ?
There are no easy tricks. With a 32 bit address register, you can only access a theoretical maximum of 4GB. In practice you'll have to subtract kernel memory space. Which CPU/OS are you using ? With IA-32, you may be able to use the PAE (Physical Address Extension). If you use Windows, look for the Address Windowing Extensions. On Linux, you can use mmap(). Through these tricks you can access more than 4GB, but only in sections, not all at the same time.

karthikbg wrote:

> Hi, > How to do that Heap allocation for a Board baed on 32-Bit CPU and OS ? > ( CPU cannot be changed at this stage :( .... !! ) > > Any tricks ?
You can allocate as much memory as you like, but not in one piece. If you want to make it look as one piece, you can implement a C++ class which will handle the pointers. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Vladimir Vassilevsky wrote:
> karthikbg wrote: > > > Hi, > > How to do that Heap allocation for a Board baed on 32-Bit CPU and OS ? > > ( CPU cannot be changed at this stage :( .... !! ) > > > > Any tricks ? > > You can allocate as much memory as you like, but not in one piece. If > you want to make it look as one piece, you can implement a C++ class > which will handle the pointers. > > > Vladimir Vassilevsky > > DSP and Mixed Signal Design Consultant > > http://www.abvolt.com
Unable to get your point. I understand that there is some method to allocate memory of any big size. But, not in one piece. How is this possible ? Could you pls explain the technique . Thx in advans, Karthik Balaguru
Arlet wrote:
> karthikbg wrote: > > > Hi, > > How to do that Heap allocation for a Board baed on 32-Bit CPU and OS ? > > ( CPU cannot be changed at this stage :( .... !! ) > > > > Any tricks ? > > There are no easy tricks. With a 32 bit address register, you can only > access a theoretical maximum of 4GB. In practice you'll have to > subtract kernel memory space. > > Which CPU/OS are you using ? With IA-32, you may be able to use the PAE > (Physical Address Extension). If you use Windows, look for the Address > Windowing Extensions. On Linux, you can use mmap(). Through these > tricks you can access more than 4GB, but only in sections, not all at > the same time.
I am using MCF5272 Coldfire processor and UCOS-II RTOS(Micrium's). Regards, Karthik Balaguru
karthikbg wrote:
> Arlet wrote: > > karthikbg wrote: > > > > > Hi, > > > How to do that Heap allocation for a Board baed on 32-Bit CPU and OS ? > > > ( CPU cannot be changed at this stage :( .... !! ) > > > > > > Any tricks ? > > > > There are no easy tricks. With a 32 bit address register, you can only > > access a theoretical maximum of 4GB. In practice you'll have to > > subtract kernel memory space. > > > > Which CPU/OS are you using ? With IA-32, you may be able to use the PAE > > (Physical Address Extension). If you use Windows, look for the Address > > Windowing Extensions. On Linux, you can use mmap(). Through these > > tricks you can access more than 4GB, but only in sections, not all at > > the same time. > > I am using MCF5272 Coldfire processor and UCOS-II RTOS(Micrium's). > > Regards, > Karthik Balaguru
Got the point now. My understanding is I need to have something similar to malloc and allocate until 1 GB (loops) and have it connected by somemeans and use it . I will try implementing the similar logic . Thx, Karthik Balaguru
karthikbg wrote:
> karthikbg wrote: > > Arlet wrote: > > > karthikbg wrote: > > > > > > > Hi, > > > > How to do that Heap allocation for a Board baed on 32-Bit CPU and OS ? > > > > ( CPU cannot be changed at this stage :( .... !! ) > > > > > > > > Any tricks ? > > > > > > There are no easy tricks. With a 32 bit address register, you can only > > > access a theoretical maximum of 4GB. In practice you'll have to > > > subtract kernel memory space. > > > > > > Which CPU/OS are you using ? With IA-32, you may be able to use the PAE > > > (Physical Address Extension). If you use Windows, look for the Address > > > Windowing Extensions. On Linux, you can use mmap(). Through these > > > tricks you can access more than 4GB, but only in sections, not all at > > > the same time. > > > > I am using MCF5272 Coldfire processor and UCOS-II RTOS(Micrium's). > > > > Regards, > > Karthik Balaguru > > Got the point now. My understanding is > I need to have something similar to malloc and allocate until 1 GB > (loops) and > have it connected by somemeans and use it . I will try implementing the > similar logic . > > Thx, > Karthik Balaguru
I may need to do have something similar to mmap() in UCOS-II. So, mostly something similar thing (mmap) in UCOS-II RTOS has to be written ?? what do you think ? Any ideas / docs for starting with this mmap creation ? Thx in advans, Karthik Balaguru
karthikbg wrote:

> Hi, > How to do that Heap allocation for a Board baed on 32-Bit CPU and OS ? > ( CPU cannot be changed at this stage :( .... !! ) > > Any tricks ? > > Thx in advans, > Karthik Balaguru >
Why is the cpu and OS a secret ??? If your using Windows and an Intel cpu and C#, NO. If your using Linux with an Intel cpu and gcc, NO. If you have an embedded application, NO. What else it there. If you would like help, please help us help you !! donald