-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPU Memory leak? #32
Comments
That memory allocation failure message comes from line 145 at Lines 136 to 153 in 2393c11
The only place where that Lines 216 to 217 in 2393c11
which is called exactly once at application startup, but never at runtime. Exactly three calls to It is odd if you are seeing this error appear during runtime. Are you shutting down and restarting fbcp-ili9341 multiple times while the Pi is running? The deallocation function for those uncached GPU memory blocks is at Lines 729 to 735 in 2393c11
where the corresponding three memory blocks are freed.
Lines 562 to 568 in 2393c11
If fbcp-ili9341 shuts down cleanly, it should free the GPU memory. There are a couple of places in the program where |
Adjusted the code at 83f1326 to more gracefully shut down if DispmanX API fails. If that is the cause, then it is possible that the new code will properly free up GPU resources. |
I should add more input: |
Reading the FATAL_ERROR does suggest like the above commit could fix the error. This line 83f1326#diff-097f3581ebc42989986bca651ddc68c4R126 is a known place where Raspberry Pi kernel code trips up due to this bug in system DispmanX: raspberrypi/userland#461 that leaves no options to fbcp-ili9341 than to abort. The above commit changed it so that when that happens, it should cleanly free up system resources, so when running as a service, it should no longer leak. I'll close this bug based on the assumption that the above machinery is working, though feel free to reopen if you still are encountering the issue. |
After running for ~30 minutes on RPi 3B with 96MB GPU memory allocated i've started getting message "Failed to allocate GPU memory! Try increasing gpu_mem allocation in /boot/config.txt. See https://www.raspberrypi.org/documentation/configuration/config-txt/memory.md".
I don't actually think it's a memory leak, but maybe some issue in memory mapping calculation?
Video setup in config.txt:
gpu_mem=96 hdmi_force_hotplug=1 hdmi_group=2 hdmi_mode=87 hdmi_cvt 480 320 60 6 0 0 0
Built parameters:
-DSPI_BUS_CLOCK_DIVISOR=12 -DWAVESHARE35B_ILI9486=ON -DARMV6Z=ON
No overclocking/downclocking.
The text was updated successfully, but these errors were encountered: