Author |
Topic: Irretrievable loss of physical RAM (Read 533 times) |
|
19Grumpah42
Junior Member
member is offline


Gender: 
Posts: 57
|
 |
Irretrievable loss of physical RAM
« Thread started on: Sep 3rd, 2009, 06:40am » |
|
As my programme grows, I find that RUNning it now consumes around 200 MB of physical RAM. And I do not get it back when I close BBC-Basic!  I use "Smart RAM" to monitor and scavenge free RAM, and it barely touches this extra consumption. I have 2 GBy RAM (normally runs with > 900 MB free under Win XPsp3 with 5 molecular dynamics [not BBC-Basic!] running) and 4 GB swapfile (around 1.5 GB in use). I now have INSTALLed WINLIB3, D3DLIB, MDILIB. Could these be the culprits? I am largely ignorant of how Win XP uses its memory, does anybody have any suggestions? Is this to be expected? --Grahame >
|
|
Logged
|
C-2-Q 3GB, C-2-Duo 2GB, both GeForce 9500 GT, WinXP sp3. Two Linux Ubuntu boxes (rock solid, lean and mean, but they won't run BB4W!).
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: Irretrievable loss of physical RAM
« Reply #1 on: Sep 3rd, 2009, 08:19am » |
|
Quote:As my programme grows, I find that RUNning it now consumes around 200 MB of physical RAM. And I do not get it back when I close BBC-Basic! |
|
The 'normal' memory used by BBC BASIC programs (i.e. the program itself, the heap, the stack, libraries etc.) is automatically freed on exit, so you should not be seeing any 'cumulative' use of memory unless your program is making calls to Windows memory-allocation API functions (such as SYS "GlobalAlloc").
Quote:I now have INSTALLed WINLIB3, D3DLIB, MDILIB. Could these be the culprits? |
|
Neither WINLIB3 nor MDILIB make any memory-allocation calls, so they shouldn't be responsible. D3DLIB doesn't do any explicit memory allocation, but Direct3D is a complex sub-system and it is entirely possible that memory may be used inappropriately if (for example) your program doesn't properly call PROC_release(). Make sure your program has the necessary ON ERROR and ON CLOSE statements so that all Direct3D resources are freed on exit.
Quote:I use "Smart RAM" to monitor and scavenge free RAM |
|
If this is a third-party (non-Microsoft) application I would recommend that you try your program(s) on a PC that does not have "Smart RAM" installed to see if it makes a difference.
Richard.
|
|
Logged
|
|
|
|
|