09-21-2020, 04:01 PM
(This post was last modified: 09-22-2020, 07:33 AM by Brian Beuken.)
Now this is interesting, I was asking about the >512MB bug on the Pi4, that causes it to be unstable, and it turns out it may well be becuase I've totallly misunderstood the purpose of the GPU allocation of GPU on Pi4 as indeed have many others
https://www.raspberrypi.org/forums/viewt...3#p1730493
Unlike the Pi3 and before, the Pi4 allocates its memory dynamcally as it needs it..which is wonderful.. the config allocation is really only to set up how much memory you give to the camera, codecs and other things... so that setting can actually be quite low.. I thought that like the Pi3 it was giving the GPU a memory pool to work from, its not the case.
When running the GPU should grab what it needs from the overall memory shared with the CPU In theory up to 1GB which is as much as the GPU can actually address, though in practice it crashes over 800mb. Which kinda explains why >512 crashes, if you give the internal systems 512 as soon as you start to do anything yourself thats remotely graphical, you're pushing up near that 800mb total, where bad things happen....though why bad things should ever happen is a mystery to me.
so.. thats quite interesting but not at all a well explained process...
Set your GPU memory quite low on a Pi 4 and you actually are giving your GPU more of that 1GB address (800mb in reality) to play with....very counter intuative.
https://www.raspberrypi.org/forums/viewt...3#p1730493
Unlike the Pi3 and before, the Pi4 allocates its memory dynamcally as it needs it..which is wonderful.. the config allocation is really only to set up how much memory you give to the camera, codecs and other things... so that setting can actually be quite low.. I thought that like the Pi3 it was giving the GPU a memory pool to work from, its not the case.
When running the GPU should grab what it needs from the overall memory shared with the CPU In theory up to 1GB which is as much as the GPU can actually address, though in practice it crashes over 800mb. Which kinda explains why >512 crashes, if you give the internal systems 512 as soon as you start to do anything yourself thats remotely graphical, you're pushing up near that 800mb total, where bad things happen....though why bad things should ever happen is a mystery to me.
so.. thats quite interesting but not at all a well explained process...
Set your GPU memory quite low on a Pi 4 and you actually are giving your GPU more of that 1GB address (800mb in reality) to play with....very counter intuative.
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's