Free does actuall releases the physical pages?

All
I was stuck with a basic UNIX malloc/free problem. Any help from anybody?
I have a program which takes all the available (Primary + SWAP) and releases (malloc/free) immediately. Please note that malloc does not actually allocates the physical pages of memory and it simply increases the DS. So after malloc, I zeroed out the entire space to allocate the acutal physical pages to my process. Later I freed the complete memory.
Neither the process size & Heap nor the resident set size decreased. Before terminating the process, I started another instance of the same process, which failed during the malloc.
The observation is on Solaris 5.7. I do know this is not related to any FS buffering or similar. Does the Anon segment memory never freed with free command? I know I am missing some basic things, can somebody help?
Thanks
Ramesh

The physical pages are not freed immediately because application may ask for more memory again.
This is to make malloc and free fast. And also it depends on which malloc library you are using.
For example :- libmtmalloc creates 2^^n caches (where n is :- 0 <= n < 16). And once free is called on a buffer, it may not be freed immediately. Programs heap is a contiguous virtual memory space and it is the responsibilty of malloc library to manage the heap not kernel. So you ran out of swap space.
--Saurabh Mishra                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • When the program gets terminated unexpectedly (power failure, UPS fails), when I reopen it, it usually does NOT return the previous pages, as I have checked in the 'options' box,

    # Question
    When the program gets terminated unexpectedly (power failure, UPS fails), when I reopen it, it usually does NOT return the previous pages, as I have checked in the 'options' box, but goes to some random collection of pages often from months ago. Very frustrating - can anything be done to COMMAND it to save current pages and re-open there? (As I said, I have this box checked in the options, but it does not work ..

    Very Important, how much Free Space is on your Hard Drive first of all? Click on the Macintosh HD on the Desktop, then do a Get Info on it.
    Could be many things, we should start with this...
    "Try Disk Utility
    1. Insert the Mac OS X Install disc, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu at top of the screen. (In Mac OS X 10.4 or later, you must select your language first.)
    *Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.*
    3. Click the First Aid tab.
    4. Select your Mac OS X volume.
    5. Click Repair Disk, (not Repair Permissions). Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then try a Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    (Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.)
    If perchance you can't find your install Disc, at least try it from the Safe Boot part onward.
    Do they launch OK while in Safe Mode?

  • When I click the Editor, it loads but does not open the Editor page. Options?

    When I click the Editor, it loads but does not open the Editor page. Options?

    Try making separate desktop icons for the Editor and Organizer. You can then launch directly. The standard desktop icon is for the welcome screen which often runs in the background or doesn’t shut down properly.
    Start by right-clicking on the desktop and select:
    New >> Shortcut
    Then browse to:
    C:\Program Files\Adobe\Photoshop Elements 13
    Inside the Photoshop Elements 13 folder make sure you select the application (not a shortcut) by scrolling down to the files beginning with the letter P and highlighting ‘PhotoshopElementsEditor’
    Then click next followed by finish.
    You can repeat for the Organizer using the different file path.
    New >> Shortcut
    Then browse to:
    C:\Program Files\Adobe\Elements 13 Organizer
    Highlight ‘PhotoshopElementsOrganizer’
    Then click next, followed by finish.
    Now that you have your separate desktop icons you can delete the one for the welcome screen, if preferred. On Mac try launching directly from Applications. [if not using PSE13 substitute your own version and go to Program Files (x86)]

  • When does iTunes release the new episodes as they come out....example walking dead ep for 23 February aired tonight but isn't available yet

    When does iTunes release the new episodes as they come out....example walking dead ep for 23 February aired tonight but isn't available yet

    When does iTunes release the new episodes as they come out....example walking dead ep for 23 February aired tonight but isn't available yet

  • Whenever I play anything on Windows Media Player Classic, the middle mouse button does not work as a vertical scroll in firefox, but instead shows a horizontal scroll that does not scroll the web pages. How can I fix this problem?

    Hi
    I have a windows 7 and whenever I play anything on Windows Media Player Classic, the middle mouse button does not work as a vertical scroll in firefox, but instead shows a horizontal scroll that does not scroll the web pages. How can I fix this problem?
    I hope that was clear.
    Thnx

    Hello kmanthie,
    I just sent you a private message. If you are not sure how to check your forum messages, this post has instructions.
    I worked on behalf of HP.

  • JInternalFrame is closed, but does not release the memory

    Hi,
    I have problem with using of JInternalFrame.
    I create a new internal frame, and close it."setClosed(true);dispose();"
    The frame does not release the memory (after gc the allocated memory is the same)
    Before close I removed all listeners, and closed all reference to other object. (I think so :-) )
    Do You have any idees?
    regards
    G�bor

    Hi,
    I think u will have to release all the associated used objects. or you can also call the finalize() method in order to release the memory.
    Regards,
    Balaji.SN

  • Print range does not print the last page in the range.

    Adobe Reader for New IPAD - The print range function does not print the last page in the range. For example, if you enter a print range of 2-18, pages 2-17 print and page 18 does not print.  Also, if you enter a print range of 9-9, page 8 prints and page 9 does not print.

    I have the Epson 4540 printer. I don't know for sure if it connects via AirPrint.  I didn't do any thing to set up Air Print.  The printer is attached directly to my network router and it shows up IPad apps.  I have not printed docs from other apps, but I will give it try and let you know.
    Christopher J. Bilcz
    [email protected]

  • Do IMac Get OS upgrade free when they release the new one?

    Do IMac Get OS upgrade free when they release the new one in the summer 2012?  or is it like Windows Where you have to pay for it ?

    hello,
    In the Mac world, major updates like 10.x (10.6 / 10.7 / 10.8) are not free. Minor upgrades like 10.6.x (10.6.4 / 10.7.3) are free.
    So OS X 10.8 will be released this summer trough the Mac App Store and will be a paid upgrade.
    Hope this will help.

  • Firefox 26 does not load the home page. Instead, it loads the previous session (and that includes all the tabs). It does not matter how Firefox is closed.

    Firefox 26 does not load the home page. Instead, it loads the previous session, irrespective of what has been entered in "Options". The browser is running in Win 7.0 64-bit; Norton Internet Suite 21 provides the security functions. There are certain "cloud" solutions also running such as Google Drive, Box, Skydrive and Cubby. The browser behaves similarly in all my machines (the setup and OS is similar to the one described above) and no amount of resetting of "Options" seems to affect it . Nor is it affected by the manner Firefox is closed. It is obviously a bug that needs to be fixed.

    u wait for firefox next update
    otherwise
    1. go to firefox tab .
    2. click on help ->trouble shooting information.
    3. reset ur browser .
    ur problem is solved

  • HT4623 iphone 3, yes its old but it was free, does not have the software update available on the menu....so how do I update it?

    iphone 3, yes its old but it was free, does not have the software update available on the menu....so how do I update it?

    Read the entire article, not just the first half.
    Iphone 3g can only go to 4.2.1

  • Oci_close does not release the connection when using DRCP

    Hello everyone,
    we are currently testing the deplyment of DRCP with 11g. I have the whole thing setup (correctly to my best knowledge), but I am facing an issue. The call to oci_close does not seem to release the connection to the pool as I would expect and therefore we see similar behavior like we were getting without using the DRCP.
    Our setup is using two RAC instances running 11.1.0.6.0, I am using PHP 5.1.6 with PECL installed oci8 1.3.4. The DRCP pool is configured and started, each with 100 max servers.
    When the webserver is idle it looks, well, idle.
    SQL> SELECT INST_ID,NUM_BUSY_SERVERS FROM GV$CPOOL_STATS;
    INST_ID NUM_BUSY_SERVERS
    1 0
    2 0
    The script is as simple as it gets:
    <?php
    $c = oci_pconnect('scott','tiger','IWPPOOLED');
    $s = oci_parse($c, 'select * from emp');
    $r = oci_execute($s, OCI_DEFAULT);
    oci_close($c);
    sleep(30);
    ?>
    What I would expect is that the script would connect to the pool, do the work for a tiny moment and then release the connection for usage by other script.
    But after I point the browser to the script, I get a 30 second loading time (as expected) but the server is busy all the time, like this:
    SQL> SELECT INST_ID,NUM_BUSY_SERVERS FROM GV$CPOOL_STATS;
    INST_ID NUM_BUSY_SERVERS
    1 0
    2 1
    After the 30 second sleep, it is released and busy servers are back to 0.
    If I load the server with ab using 256 connections:
    ab -n 1000000 -c 256 -k http://mywebserver/ocitest.php
    the pool is maxed out and the connects are stalling:
    SQL> SELECT INST_ID,NUM_BUSY_SERVERS FROM GV$CPOOL_STATS;
    INST_ID NUM_BUSY_SERVERS
    1 95
    2 95
    My network config for this service is following:
    IWPPOOLED =
    (DESCRIPTION =
    (LOAD_BALANCE=ON)
    (FAILOVER=ON)
    (ADDRESS = (PROTOCOL = tcp)(HOST = 10.1.16.33)(PORT = 1521))
    (ADDRESS = (PROTOCOL = tcp)(HOST = 10.1.16.34)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = IWP)
    (SERVER=POOLED)
    (FAILOVER_MODE=
    (TYPE=SELECT)
    (METHOD=BASIC)
    (RETRIES=5)
    (DELAY=3)
    The phpinfo() look like this:
    OCI8 Support enabled
    Version 1.3.4
    Revision $Revision: 1.269.2.16.2.38.2.20 $
    Active Persistent Connections 1
    Active Connections 1
    Oracle Instant Client Version 11.1
    Temporary Lob support enabled
    Collections support enabled
    Directive Local Value Master Value
    oci8.connection_class IWPAPP IWPAPP
    oci8.default_prefetch 100 100
    oci8.events On On
    oci8.max_persistent -1 -1
    oci8.old_oci_close_semantics Off Off
    oci8.persistent_timeout -1 -1
    oci8.ping_interval -1 -1
    oci8.privileged_connect Off Off
    oci8.statement_cache_size 20 20
    I am using the instant client for 11g
    Any ideas?
    Thanks!
    Michal

    Don't forget to use oci_free_statement($s); See "Closing Oracle Connections" in The Underground PHP and Oracle Manual. (I was just simplifying this example today for the next release of the manual).
    You may also see the "dedicated optimization", where a pooled server in a non- maxed-out pool is retained (unless needed by another PHP process) under the assumption that the initial PHP process might become active again. See http://www.oracle.com/technology/tech/php/pdf/php-scalability-ha-twp.pdf
    Feel free to email me offline (see my profile) if there are questions/data you don't want to post.
    cj
    Edited by: cj2 on Oct 16, 2008 8:12 AM

  • MappedByteBuffer - How does it handle the physical memory?

    Hello!
    I have some question regarding the java.nio.MappedByteBuffer class. I am wondering how does it exactly handle the physical memory.
    As first, I guess when I map a file into the the memory it does not mean that the whole file is being read into the physical memory. Am I right?
    My second question is, if I map more files into the memory, is there a real danger that I will get an out-of-memory exception? Is available any official resource about the memory management of this class?
    And my third question is, what is more efficient way at all, to use the MappedByteBuffer class or to use a FileChannel?
    I am looking forward to your replies!

    Tomi1226 wrote:
    I have some question regarding the java.nio.MappedByteBuffer class. I am wondering how does it exactly handle the physical memory.Java maps the file into virtual memory, the OS determines how to translate virtual memory into physical memory. Java has no control over how the OS does this, nor should it need to.
    As first, I guess when I map a file into the the memory it does not mean that the whole file is being read into the physical memory. Am I right?True, map != read or what would be the point.
    My second question is, if I map more files into the memory, is there a real danger that I will get an out-of-memory exception? An out of memory ERROR occurs when you run out of heap space. If you create enough file maps you are likely to run out of file handles or some other resourfe before you run out of heap.
    Exception != Error.
    Is available any official resource about the memory management of this class?Which class?
    And my third question is, what is more efficient way at all, to use the MappedByteBuffer class or to use a FileChannel?It depends on what you are doing.

  • After I have finished at a site and want to go back to the start page the "go back arrow" does not show the start page how can I fix this

    I am using Fire fox 3.6.15 which was updated on the March 6th.
    The Start Page will open and allow me to go to any site but when I want to return to the Start Page via the 'go back arrow' the Start Page is not listed.
    I am wondering if it is part of the new upgrade.

    It's actually not hard to fix. I had the same problem on my Bold 9700. You need to go to the main desktop on your Blackberry, and find the Messages icon (it looks like an envelope - same-looking icon as your email icon). Click on it, then scroll thru the messages. You'll find a message with same annoying little yellow circle icon, and the URL of the web site you tried to access when your Blackberry powered down. Click on the URL, and let your Blackberry load that web site. Voila! After that, the Browser Notification Icon will have disappeared.
    I wish that future versions of the Blackberry OS will alow you to click directly on the notification icon and get taken to the relevant app (as happens in Windows). As is stands, the notification icons are more annoying than useful.

  • My homepage does not show the latest page when I open Firefox

    I have set MSN as my homepage but when I open Firefox it does not show the latest MSN page.

    '''''Has the site worked normally in Firefox before?'''''
    When you have a new problem with one particular site, a good "first thing to try" is clearing your Firefox cache and deleting your saved cookies for the site.
    (1) Bypass Firefox's Cache
    Use Ctrl+Shift+r to reload the page fresh from the server.
    Alternately, you also can clear Firefox's cache completely using:
    orange Firefox button (or Tools menu) > Options > Advanced
    On the Network mini-tab > Cached Web Content : "Clear Now"
    If you have a large hard drive, this might take a few minutes.
    (2) Remove the site's cookies (save any pending work first). While viewing a page on the site:
    * right-click and choose View Page Info > Security > "View Cookies"
    * Alt+t (open the classic Tools menu) > Page Info > Security > "View Cookies"
    This will open a window listing the site's cookies, which you can remove individually.
    Then try reloading the page and logging back in. Does that help?

  • Firefox STILL does not open the home page when a new tab is selected

    I have just 'upgraded' to FF4 and expected that the irritating 'new tab homepage load situation' would have been resolved by now: sadly, it looks to STILL be around.
    MS IE has been loading the homepage DIRECTLY when a new tab is selected for about FOUR YEARS now, so I'm staggered that such a simple but very useful feature is not available in Firefox.
    The obvious question is WHY??
    In IE, you don't have to keep hitting the home page button to carry out a search in google when a new tab is selected, and IE does NOT need an 'add-on' to incorporate this functionality; it really is quite irritating that the function is still not built-in to FF, and the coding requiret to incorporate the function ain't rocked science Mozilla people - WHY has this not been put into effect by now?

    Some people prefer a blank tab because it takes no time to load. Some people prefer their home page. Some people prefer a list of most frequently used sites. It would be convenient if all of these options were built in, but obviously no one stepped up and made it a priority.
    By the way, another way to search in a new tab is: Using the search box (on the toolbar), after typing your query, either press Alt+Enter or Ctrl+click the magnifying glass. This opens the search in a new tab and saves that step.

Maybe you are looking for

  • Unable to create new entry in table that has no primary key

    Hi    I have a table which is required to have no primary key (except mandt). After i generate table maintanance, when I go to create new entries, the table control to enter the new values does not appear. When I click on edit->new entries, it goes b

  • Digichat software compilation units

    Hi all I have getted digichat software packages I want to run this packages in my computer as a software Now Iam commpiling each class alone but the problem is that some classes contain compilation errors do you advice me to make changes in software

  • Shared video pictures aren't correct

    I have a lot of movies on my main iTunes library at home.  A mixture of iTunes-purchased movies, Blu-ray discs with digital copy, and Handbrakes of old DVDs I own.  When I use the video app on my iPad and access the shared library, many of the cover

  • Why can't I scale/ crop photos in instagram?

    In Instagram, I don't have the option to scale or crop photos/ the function doesn't work. At the top of the screen, the only menu item is "next" when I'm in the scale and crop function. There is no "crop" button as Instagram help indicates there shou

  • Problem with integration of BI Discoverer10.1.2.3 with EBS12.1.1

    Use note 373634.1 Step 5.7.4 after having used eulapi to grant SYSADMIN with PRIVILEGE administration and all_admin_privs, I get the error to login BI Discoverer Plus using SYSADMIN - Failed to connect to database - ORA-01017: invalid username/passwo