How do I find out using a command or reading from a file, what is the allocation for the video memory is? Yes, I can subtract the available memory from my total memory. Any other solution?
Also, how can I change it?
Thanks.
Re: Video Memory Allocation
Hi amitsaha,
> How do I find out using a command or reading from a file,
> what is the allocation for the video memory is?
You could read /boot/config.txt and look for
gpu_mem=, gpu_mem_256= or gpu_mem_512=
If not existing, then the default is 64,
compare http://elinux.org/RPi_config.txt
I assume the GPU memory is set during boot
and cannot be changed during runtime.
> How do I find out using a command or reading from a file,
> what is the allocation for the video memory is?
You could read /boot/config.txt and look for
gpu_mem=, gpu_mem_256= or gpu_mem_512=
If not existing, then the default is 64,
compare http://elinux.org/RPi_config.txt
I assume the GPU memory is set during boot
and cannot be changed during runtime.
Re: Video Memory Allocation
Ah. Thanks a lot. I could do that by setting the gpu_mem_512 variable. By default, it was allocating 64 MB as shared memory.Deteros wrote:Hi amitsaha,
> How do I find out using a command or reading from a file,
> what is the allocation for the video memory is?
You could read /boot/config.txt and look for
gpu_mem=, gpu_mem_256= or gpu_mem_512=
If not existing, then the default is 64,
compare http://elinux.org/RPi_config.txt
I assume the GPU memory is set during boot
and cannot be changed during runtime.
Another query: Now, I have 466 MB for OS memory and 32 MB for shared graphics. Where am I missing the remaining 14 MB of my 512 MB memory?
Thanks for any ideas.
Re: Video Memory Allocation
Hi amitsaha,
> Another query: Now, I have 466 MB for OS memory and 32 MB for shared graphics.
> Where am I missing the remaining 14 MB of my 512 MB memory?
Available memory is 477648k = 466 MByte.
If you study the kernel log messages (on my system in /var/log/messages)
you'll find (I have the same config then you: 512 MB with 32 MB shared graphics):
[ 0.000000] Memory: 480MB = 480MB total
[ 0.000000] Memory: 477476k/477476k available, 14044k reserved, 0K highmem
-> Linux reserves 14044k
...
[ 8.554283] Freeing init memory: 172K
-> frees 172k, thus free memory is now 477476k+172k = 477648k - same as above.
> Another query: Now, I have 466 MB for OS memory and 32 MB for shared graphics.
> Where am I missing the remaining 14 MB of my 512 MB memory?
Available memory is 477648k = 466 MByte.
If you study the kernel log messages (on my system in /var/log/messages)
you'll find (I have the same config then you: 512 MB with 32 MB shared graphics):
[ 0.000000] Memory: 480MB = 480MB total
[ 0.000000] Memory: 477476k/477476k available, 14044k reserved, 0K highmem
-> Linux reserves 14044k
...
[ 8.554283] Freeing init memory: 172K
-> frees 172k, thus free memory is now 477476k+172k = 477648k - same as above.
Re: Video Memory Allocation
Hi Deteros,
Thanks.
Thank you for your reply. I had a feeling that it must be the reserved memory. Thank you for confirming this. I also checked it myself.Deteros wrote:Hi amitsaha,
> Another query: Now, I have 466 MB for OS memory and 32 MB for shared graphics.
> Where am I missing the remaining 14 MB of my 512 MB memory?
Available memory is 477648k = 466 MByte.
If you study the kernel log messages (on my system in /var/log/messages)
you'll find (I have the same config then you: 512 MB with 32 MB shared graphics):
[ 0.000000] Memory: 480MB = 480MB total
[ 0.000000] Memory: 477476k/477476k available, 14044k reserved, 0K highmem
-> Linux reserves 14044k
...
[ 8.554283] Freeing init memory: 172K
-> frees 172k, thus free memory is now 477476k+172k = 477648k - same as above.
Thanks.
Re: Video Memory Allocation
And this is a great post explaining about the memory allocation: http://winfred-lu.blogspot.com.au/2011/ ... -mips.html
Re: Video Memory Allocation
If you start to use CMA (beta at the moment) then the sharing between Arm and GPU is dynamic- the GPU gives up memory to the Arm and vica versa as required.
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.
Working in the Applications Team.