Author Topic: Increase of Memory Usage with Time in QB64-produced Programs  (Read 2773 times)

0 Members and 1 Guest are viewing this topic.

Offline Qwerkey

  • Forum Resident
  • Posts: 755
    • View Profile
Increase of Memory Usage with Time in QB64-produced Programs
« on: October 16, 2019, 09:45:37 am »
Being interested in how much memory one of my programs uses, I loaded Task Manager (Windows), and was surprised to find that my program's memory usage increased monotonically with time.

With the program doing nothing but waiting for a keypress:

Code: QB64: [Select]
  1. k$ = ""
  2. WHILE k$ = ""
  3.         k$ = INKEY$
  4.         _LIMIT 30

there is a gradual increase in memory usage, when you might expect it to remain constant.  The initial increase rate is about 5kB/s which deceases to about 0.2kB/s after about 5 minutes.

Other programs have a varying amount of memory usage (depending upon what they're doing).

The rate of increase continues to get smaller with time.

In a usage of about 68MB this is hardly worrying, but any ideas why this happens?  (I did notice the same thing happens in another QB64-produced program).  Could it even be a reporting inaccuracy phenomenon?  More likely to be that I understand zero about how a computer uses memory!

FellippeHeitor

  • Guest
Re: Increase of Memory Usage with Time in QB64-produced Programs
« Reply #1 on: October 16, 2019, 10:07:02 am »
Sounds like a leak.