- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Deallocate memory
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-24-2005 12:15 AM
тАО10-24-2005 12:15 AM
Deallocate memory
Is there some way to retrieve dynamic memory deallocated by a program without stopping the program. I want the working set to be decreased after the deallocate.
Regards
Kjell Carlsson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-24-2005 12:47 AM
тАО10-24-2005 12:47 AM
Re: Deallocate memory
it's possible to purge the workingset of a process using DECamds / Availability Manager:
http://h71000.www7.hp.com/openvms/products/availman/6552pro_010.html#purge_fix
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-24-2005 12:47 AM
тАО10-24-2005 12:47 AM
Re: Deallocate memory
There are of course the $ADJWSL, the $PURGWS and $PURGE_WS system services.
I'm not aware of a DCL command to do it from outside a program (although there is the SET WORKING_SET command).
Kris (aka Qkcl)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-24-2005 12:49 AM
тАО10-24-2005 12:49 AM
Re: Deallocate memory
Kjell, your question does not compute.
Dynamic memory and workingsets have only an indirect relation.
Please be sure to spend a little time in the books reviewing virtual memory and working sets.
With 'deallocated dynamic memory' may we assume you mean malloced memory which was freed, or lib$getvm memory for which lib$freevm was called?
That memory is free for re-use by next malloc/lib$getvm, but it remains part of the address space: no SYS$DELTVA will be called for it. Of course if you do not touch again, then it is as good as gone, unless the 1GB P0 limit is a problem for your application.
Also check out VM ZONEs.
Now the working set are those virtual memory pages which can readily be addressed without a pagefault and it correspond to the physical page use for a process. If you know there are pages in the working set which not will be re-used, then you can 'help' the system by call SYS$PURGWS to tell it to go shrink now. This will avoid the system from having to look at other processes and will be more aggressive while there is no outside pressure (yet). In turn this means that the pages which were purged out, but were still in active use will tend to simply be soft-faulted back in from the free or modified list.
Hope this helps,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-24-2005 01:19 AM
тАО10-24-2005 01:19 AM
Re: Deallocate memory
If you want to be sure:
1. call LIB$CREATE_VM_ZONE (zone_id, ...)
2a. call LIB$GET_VM (zone_id, size...)
2b. call LIB$GET_VM (zone_id, size...)
...
3a. call LIB$FREE_VM (zone_id, size...)
3b. call LIB$FREE_VM (zone_id, size...)
...
4. call LIB$DELETE_VM_ZONE (Zone_id)
If you want to free all memory in this zone at once, you don't need to deallocate each allocated chunk apart, so omit step 3. Step 4 will do it automatically.
There are a few variants of these routines, check http://h71000.www7.hp.com/doc/82final/5932/5932pro.html
OpenVMS Developer & System Manager