Sponsored Content
Full Discussion: Memory Deallocation Enquery
Top Forums Programming Memory Deallocation Enquery Post 102183 by jim mcnamara on Thursday 16th of March 2006 07:00:38 AM
Old 03-16-2006
delete does release all of the memory, except memory that you explicitly allocated with a separate malloc call, which is not very common in C++.

If you are seeing that the program's process seems to keep memory after a delete call, it's because of the os, not your code. The operation to get more memory is expensive, so the os usually holds onto memory until the process exits.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

shared memory deallocation

This is on HP UNIX version 11. I have a shared memory segment that is marked for deallocation .... see below m 521 0x00000000 D-rw-rw---- oracle dba The D says it marked for deallocation. I tried to do the ipcrm -m 521. The message said it cannot find the segment. I assume... (1 Reply)
Discussion started by: joecbc
1 Replies

2. UNIX for Advanced & Expert Users

Shared memory shortage but lots of unused memory

I am running HP-UX B.11.11. I'm increasing a parameter for a database engine so that it uses more memory to buffer the disk drive (to speed up performance). I have over 5GB of memory not being used. But when I try to start the DB with the increased buffer parameter I get told. "Not... (1 Reply)
Discussion started by: cjcamaro
1 Replies

3. Programming

how to round up a memory address(memory alignment problem)

Hi, I try to marshal a unsigned int and a char * into a buffer, and then unmarshal them later to get them out. I need to put the char * in the front and unsigned int at the end of the buffer. However, my system always give me "BUS ERROR". I am using Sun Sparcs Sloris 2.10. My code to marshal... (6 Replies)
Discussion started by: nj302
6 Replies

4. HP-UX

How can I get memory usage or anything that show memory used from sar file?

Refer from title: How can i get memory used or anything that can show memory from sar file example on solaris:- we can use sar with option to show memory used at time that sar crontab run. on HP-UX, it not has option to see memory used. But i think it may be have some parameter or some... (1 Reply)
Discussion started by: panithat
1 Replies

5. Solaris

How to find Total and Free Physical Memory and Logical Memory in SOLARIS 9

Hi, Im working on Solaris 9 on SPARC-32 bit running on an Ultra-80, and I have to find out the following:- 1. Total Physical Memory in the system(total RAM). 2. Available Physical Memory(i.e. RAM Usage) 3. Total (Logical) Memory in the system 4. Available (Logical) Memory. I know... (4 Replies)
Discussion started by: 0ktalmagik
4 Replies

6. Programming

How to deal with lots of data in memory in order not to run out of memory

Hi, I'm trying to learn how to manage memory when I have to deal with lots of data. Basically I'm indexing a huge file (5GB, but it can be bigger), by creating tables that holds offset <-> startOfSomeData information. Currently I'm mapping the whole file at once (yep!) but of course the... (1 Reply)
Discussion started by: emitrax
1 Replies

7. Solaris

restrcit physical memory with zone.max-locked-memory

Is it possible to restrict physical memory in solaris zone with zone.max-locked-memory just like we can do with rcapd ? I do not want to used rcapd (1 Reply)
Discussion started by: fugitive
1 Replies

8. UNIX for Advanced & Expert Users

Out of Memory error when free memory size is large

I was running a program and it stopped and showed "Out of Memory!". at that time, the RAM used by this process is around 4G and the free memory size of the machine is around 30G. Does anybody know what maybe the reason? this program is written with Perl. the OS of the machine is Solaris U8. And I... (1 Reply)
Discussion started by: lilili07
1 Replies

9. Shell Programming and Scripting

perl function enquery

Dear all, I find a perl script that contains the following codes. Does anybody know the meaning of codes highlight. ..... @field = parse_csv($file); chomp(@field); ........ ........ sub parse_csv { my $text = shift; my @new = (); push( @new, $+ ) while $text =~ m{... (9 Replies)
Discussion started by: eldonlck
9 Replies

10. Solaris

[DOUBT] Memory high in idle process on Solaris 10 (Memory Utilization > 90%)

Hi Experts, Our servers running Solaris 10 with SAP Application. The memory utilization always >90%, but the process on SAP is too less even nothing. Why memory utilization on solaris always looks high? I have statement about memory on solaris, is this true: Memory in solaris is used for... (4 Replies)
Discussion started by: edydsuranta
4 Replies
ost::MemPagerObject(3)					     Library Functions Manual					    ost::MemPagerObject(3)

NAME
ost::MemPagerObject - This class is used to create derived classes which are constructed within a memory pager pool. SYNOPSIS
#include <misc.h> Public Member Functions void * operator new (size_t size, MemPager &pager) Allocate memory from a memory pager. void * operator new[] (size_t size, MemPager &pager) Allocate array from a memory pager. void operator delete (void *) Mempager delete does nothing; the pool purges. void operator delete[] (void *) Array mempager delete does nothing; the pool purges. Detailed Description This class is used to create derived classes which are constructed within a memory pager pool. create objects in a memory pager. Author: David Sugar dyfet@ostel.com Member Function Documentation void ost::MemPagerObject::operator delete (void *) [inline] Mempager delete does nothing; the pool purges. void ost::MemPagerObject::operator delete[] (void *) [inline] Array mempager delete does nothing; the pool purges. void* ost::MemPagerObject::operator new (size_tsize, MemPager &pager) [inline] Allocate memory from a memory pager. Parameters: size of new passed from operator. pager to allocate from. void* ost::MemPagerObject::operator new[] (size_tsize, MemPager &pager) [inline] Allocate array from a memory pager. Parameters: size of new passed from operator. pager to allocate from. Author Generated automatically by Doxygen for GNU CommonC++ from the source code. GNU CommonC++ Sat Jun 23 2012 ost::MemPagerObject(3)
All times are GMT -4. The time now is 02:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy