- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using the following code to know how much memory my arrays are using:
>>>>
allocate(a(nx))
............
............
............
.............using a() here..........
..........
.........
pause -----[1]
dealocate(a)
pause-----[2]
>>>>>>>>>>
I check the task manager at [1] and [2].
When I ran the code with multiple arrays (instead of just one), I didn't see any significant change in memory at [1] and [2] pause statement. I am just wondering if there is any other program which can tell me 'not so significant' memory changes?
Thanks.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Windows Task Manager will tell you how much of the programs virtual memory has been accessed. On a Win32 system all programs get 4GB of address, 2GB (or up to 3GB) of address is available to the application, 1GB of address is available for Windows as accessable by your application.
This virtual memory is not committed (assigned to portions of the Pageing File) to your application untilthe applicationtouchesthe memorywith either a read or write. Once it touches the memory this commited virtual memory stays with the application as long as it exists (there are some system calls that will return this).
The application allocation heap will initialy have the remainder of the 2GB (or 3GB) address available, almost all of which is not-committed. As allocations occur you will see the applicationmemory footprint increase but not decrease. (The footprint will decrease if your application makes the system calls to inform Windows that a given address range is no longer required.)
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page