Python Forum
How to I make my program release memory?
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to I make my program release memory?
#11
Dumb mistake of mine, thank you :)

I followed the instructions you gave and I do indeed now have much larger swap memory, I do get some error messages though, it says "X11 connection rejected because of wrong authentication." when logging into the PI using SSH as well as when running my python program.

I am curious to why this was necessary though. I have a 8GB memory card so using 2GB of them for swap memory isn't ideal even though it's not a problem for this particular project. Isn't now my memory card acting as RAM? Which might also not be ideal when thinking of the limited read/write cycles that memory cards have.

I didn't have as much free space as I though, adding the 2GB swap file made it so that I could no longer run my program, out of memory it said. I undid the previous steps and erased the swap file, then redid everything only with a swap file of 1024MB in stead, but doing so made the swapon command to fail:

swapon: /home/pi/swap2.img: insecure permissions 0644, 0600 suggested.
swapon: /home/pi/swap2.img: read swap header failed

I will look into the sounddevice package, or perhaps I can find some other package that can do the job :)
Reply


Messages In This Thread
RE: How to I make my program release memory? - by Plecto - Dec-18-2016, 08:52 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Is it possible to make a program recognize how many clicks it has had on the monitor? jao 0 1,174 Feb-25-2022, 06:31 PM
Last Post: jao
  How to make a Vocal synthesizer program on Python? Seadust 3 3,620 Jan-28-2021, 06:26 PM
Last Post: gonnach
  How to make a Python program run in a dos shell (cmd) Pedroski55 2 2,362 Nov-09-2020, 10:17 AM
Last Post: DeaD_EyE
  I try to make Heron formula program abcd 7 3,488 Oct-22-2020, 12:48 AM
Last Post: abcd
  Make a Python program executable in Windows Pedroski55 1 2,137 Sep-26-2020, 12:34 AM
Last Post: bowlofred
  I code a program to solve puzzle but i can't make it more dynamic. Shahmadhur13 5 2,815 Apr-18-2020, 10:05 AM
Last Post: Shahmadhur13
  how to make a program with a certain number of multiples? syafiq14 3 2,819 Jan-01-2020, 02:39 PM
Last Post: syafiq14
  How to get mouse coordinates on click and release OhNoSegFaultAgain 1 3,024 May-17-2019, 06:56 PM
Last Post: buran
  How to make a program run "online"? DanielTkach 2 2,566 Apr-09-2019, 11:59 PM
Last Post: DanielTkach
  Python 3.4: the only release to create .EXE standalone without .dll samsonite 7 5,863 Feb-28-2019, 09:20 AM
Last Post: samsonite

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020