ByteBuffer.allocateDirect vs. NewDirectByteBuffer and freeing memory

Hi all, I have a very basic question that I'm afraid I couldn't find in any documentation. My question is, when a ByteBuffer in my JVM wraps a direct memory buffer does it try to free that native memory when it gets GC'd? It seems like it would have to do this when I (the user) create it via ByteBuffer.allocateDirect; but if I use a JNI call into NewDirectByteBuffer, I understand that I'm taking responsibility for freeing that memory when I'm finished with it. Both will return true for isDirect(), but in the case where I created the buffer myself and passed it to NewDirectByteBuffer, then free'd that memory myself, will the ByteBuffer object know that it's not supposed to free that memory?
Thanks in advance.

koverton wrote:
Hi all, I have a very basic question that I'm afraid I couldn't find in any documentation. My question is, when a ByteBuffer in my JVM wraps a direct memory buffer does it try to free that native memory when it gets GC'd? Yes, but I have found it does this very slowly. i.e. When the JVM runs low on heap space it will GC before it throws an OutOfMeoryError However for non-heap space this doesn't happen so reliably.
It seems like it would have to do this when I (the user) create it via ByteBuffer.allocateDirect; but if I use a JNI call into NewDirectByteBuffer, I understand that I'm taking responsibility for freeing that memory when I'm finished with it. Both will return true for isDirect(), but in the case where I created the buffer myself and passed it to NewDirectByteBuffer, then free'd that memory myself, will the ByteBuffer object know that it's not supposed to free that memory?Your best bet is to check the finialize() code. You may be able to break point it to see what it does in your case.
If you are not sure, why not call ByteBuffer.allocateDirect().

Similar Messages

  • Garbage Collecting and freeing memory in JTree

    Suppose you have a JTree with a model that takes a lot of memory. after you are finished using the tree you want to free this memory. so you go on and use the
    tree.setModel(null) method, hoping everything will be fine. to be extra sure you even set the root to null.
    what happens is that the tree view is cleared but the memory isn't.
    my conclusion is that somwhere in the tree package there are refrences to the tree root, model or whatever that keeps it from been garbage collected. to make sure my code doesn't keep any refrences to the tree model I am using a very thin class that only instantiates a tree and fills it with data. this class keeps no members, listeners, refrences and so on.
    calling system.gc() does nothing.
    Is there a simple way to clear memory in a JTree ?
    without using weak refrences and other unwanted complexities.

    Hi, thanks for the response.The C API version is 6.5.3 or 6.5.4.2, depending on the environment.I'll paste the code in here, but it is completely based on the sample programs so I'm not sure where else we could free up memory (any insights appreciated!):ESS_MEMBERINFO_T *pChildMemberInfo = NULL;sts = ESS_Init();if(sts == ESS_STS_NOERR){ sts = ESS_Login(srvrName, adminUserName, password);if(sts == ESS_STS_NOERR){// set the active dbsts = EssSetActive(hCtx, appName, dbName, &Access);if(sts == ESS_STS_NOERR){memset(&Object, '\0', sizeof(Object));// open the outline for use in subsequent callsObject.hCtx = hCtx;Object.ObjType = ESS_OBJTYPE_OUTLINE;Object.AppName = appName;Object.DbName = dbName;Object.FileName = dbName;sts = EssOtlOpenOutline(hCtx, &Object, ESS_FALSE, ESS_FALSE, &hOutline);if(sts == ESS_STS_NOERR){// get member names from outline, so// this section includes a number of // sts = EssGetMemberInfo(hCtx, // category, &pChildMemberInfo);// calls to query member names.// Then some calls are made to free // these resources:if(pChildMbrInfo){EssOtlFreeStructure(hOutline, 1, ESS_DT_STRUCT_MBRINFO, pChildMbrInfo);}if(pChildMemberInfo){EssFree(hInst, pChildMemberInfo);}EssOtlCloseOutline(hOutline);}}ESS_Logout();}ESS_Term();}

  • Ejecting disk issues and freeing memory

    Ok, so sometimes the disk gets stuck and I can't find a way to get it to eject. What should I do?
    Also, something is taking up space on my macbook pro and I don't know what it is. I deleted unwanted programs, videos, and movies. I still want to free more space. When i click "About this mac" it says 34.22GB free out of 211GB. There is this huge yellow portion that says 61.35 what is that? Thanks.

    In Mac Help:
    If you’re trying to eject a CD or DVD:
    Choose Apple menu > Log Out, and then log in again. Try to eject the disc again.
    If you still can’t eject the CD or DVD, choose Apple menu > Restart. While your computer restarts, hold down the mouse button or trackpad button until the disc is ejected.
    The Yellow portion is a catch all category for items that do not fall into the other ones.  Best way to find what you don't want is to down load from the Internet OmniDiskSweeper (free) and open it.  It will show you in a sequential format all you files and the space they are taking.
    Ciao.

  • Stealing memory from JVM with ByteBuffer.allocateDirect

    Hi,
    I am stealing many megabytes of memory for permanent JNI use via ByteBuffer.allocateDirect when my java app boots.
    Does the JVM account for this relative to the total memory that the maxmem property
    has indicated when the JVM is launched?
    Thanks,
    Andy

    JNI has nothing to do with it.
    It would of course be easy to test that.
    With a standard VM the limit is 64m. So just allocate that much.
    Myself I seriously doubt that it wouldn't impact the heap.

  • Disposing a jframe, and freeing up memory

    Greetings,
    I hope this is the proper forum for memory issues.
    I have an enterprise database reporting desktop application that I am developing. The GUI application reports on a huge set of data that results in the app taking up to 125 MB worth of memory when fully loaded. There are moments in using the application that all of the data will need to be refreshed entirely, and the JFrame that reports it be reloaded in the process.
    I am wondering how to dispose the JFrame and release all of the data associated with it. I use NetBeans to develop my GUI, and so all of the data that is needed for the JFrame is a class variable of the JFrame (so the data can be accessed as it is needed). But, when the frame is disposed, I no longer need anything associated with the JFrame that gets disposed. The Javadoc for Window.dispose() seems to imply that not all of the resources will be released and GC'd when you call dispose, because it says "The Window and its subcomponents can be made displayable again by rebuilding the native resources with a subsequent call to pack or show." which to me says that the data is being remembered and not collected by the GC.
    Anyone have any tips for GUIs and memory management? It seems like any GUI app could get pretty large pretty fast if there's no way to release the data associated with the GUI.
    Here's the code I've tested that doesn't seem to be releasing the memory (stress tests of closing and re-opening the window multiple times shows the java.exe process eating more and more memory):
        public void reset(){
            this.dispose();
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new PartsDashboard(partNum, dateFrom, dateTo);
            try{
                this.finalize();
            } catch (Throwable t){
                t.printStackTrace();
        }Thanks in advance.

    Three things you can always count on in life: Death, Taxes, and AndrewThompson64 telling people to post an SSCCE. =)
    Just poking fun.
    Anyways, this problem has gone from probably-should-deal-with-soon to critical issue. Here is the SSCCE to illustrate the problem. NOTE: My client is using Windows and I am using Windows, so how this acts on Linux/Mac isn't important to me. Also, a few of my client's machines are not well equipped (512 MB RAM), so they have agreed to up their hardware a bit.
    But the big problem, on my end, is that disposed windows DO NOT free up resources once disposed. My program is very data-heavy. I have considered grabbing less data from the database but this would mean the program would have to go to the database more often. The ultimate dilemma of time vs space, essentially.
    To explain the SSCCE: There is a main window with a button. If you click the button, it launches another window with a String array that is 500,000 items large (to simulate a lot of data), and a JList to view those strings. Closing the data-heavy child window does not free up the memory that it uses, and if you launch a bunch of the child windows in the same program instance (close each child before launching a new one) then you will see the amount of memory piling up.
    Am I doing something wrong? Has anyone else experienced similar problems? Does anyone have suggestions? Thank you.
    import java.awt.Dimension;
    import java.awt.FlowLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JList;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    * @author Ryan
    public class MemoryLeak {
        public static void main(String[] args) {
            // Launch Base Frame
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new BaseFrame().setVisible(true);
    class BaseFrame extends JFrame{
        public BaseFrame() {
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            setPreferredSize(new Dimension(300,300));
            JPanel panel = new JPanel();
            panel.setLayout(new FlowLayout(FlowLayout.CENTER, 150, 5));
            JButton button = new JButton("Launch Data-Heavy Child");
            // JButton will launch Child Frame
            button.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    java.awt.EventQueue.invokeLater(new Runnable() {
                        public void run() {
                            // Notice no references to ChildFrame, period.
                            new ChildFrame().setVisible(true);
            panel.add(button);
            add(panel);
            pack();
    class ChildFrame extends JFrame{
        public ChildFrame() {
            setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
            setPreferredSize(new Dimension(300,600));
            JPanel panel = new JPanel();
            panel.setLayout(new FlowLayout());
            // Simulate lots of data.
            String[] dataArr = new String[500000];
            for(int i = 0; i < dataArr.length; i++) {
                dataArr[i] = "This is # " + i;
            // Something to display the data.
            JList list = new JList(dataArr);
            JScrollPane scrollPane = new JScrollPane(list);
            scrollPane.setPreferredSize(new Dimension(200, 550));
            panel.add(scrollPane);
            add(panel);
            pack();
    }

  • Semaphores and shared memory's classes

    Hi there,
    I looking for the classes used to deal with semaphores and shared memory. Does anyone know which are these classes?
    Thanks

    The file mapping capability added in 1.4 may result in shared memory but this is not guaranteed. You can use JNI to call some C code which allocates shared memory and then uses the NewDirectByteBuffer method to return a ByteBuffer representing that shared memory to the Java code.
    You would also need to use JNI to wrap system provided semaphore or mutex operations to provide cross process synchronization.
    However, do your communication needs really require performance in excess of that available using sockets? I can get at least 7MB/s between two processes on a rather modest machine.

  • Freeing Memory

    Is it better to use the terminal, sudo purge command or use a Clean Memory app. for freeing memory?
    Can the Terminal command cause damage?
    Thanx.

    SSR,
    Thank you for the feedback. My issue, it seems, was VLC. I say was, because I have since removed it.
    I would check my free memory and it would be around 1.02 GB.
    I would then watch a couple of movies or TV shows on VLC.
    After finishing and shutting down VLC, my memory would be at 16MB and my MBP would be running poorly.
    I used sudo purge and memory went back up to 1.75GB.
    After reading your post, I removed all traces of VLC and installed MPlayer.
    No more free memory problem.
    Thank you.

  • My macbook pro model mid 2009 is running slow. free memory is 35 mbs and inactive memory is  1.36 gb with a total of 5 gb RAM memory

    Problem description:
    too much inactive memory 1.87 gb and free memory only 35 mb
    EtreCheck version: 2.1.1 (104)
    Report generated 10 December 2014 3:30:26 pm IST
    Hardware Information: ℹ️
      MacBook Pro (13-inch, Mid 2009) (Verified)
      MacBook Pro - model: MacBookPro5,5
      1 2.26 GHz Intel Core 2 Duo CPU: 2-core
      5 GB RAM Upgradeable
      BANK 0/DIMM0
      1 GB DDR3 1067 MHz ok
      BANK 1/DIMM0
      4 GB DDR3 1067 MHz ok
      Bluetooth: Old - Handoff/Airdrop2 not supported
      Wireless:  en1: 802.11 a/b/g/n
    Video Information: ℹ️
      NVIDIA GeForce 9400M - VRAM: 256 MB
      Color LCD 1280 x 800
    System Software: ℹ️
      OS X 10.10.1 (14B25) - Uptime: 4:42:54
    Disk Information: ℹ️
      WDC WD5000LPVT-80G33T2 disk0 : (500.11 GB)
      S.M.A.R.T. Status: Verified
      EFI (disk0s1) <not mounted> : 210 MB
      [redacted] (disk0s2) / : 499.25 GB (142.01 GB free)
      Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
      HL-DT-ST DVDRW  GS23N 
    USB Information: ℹ️
      Apple Inc. Built-in iSight
      Apple Internal Memory Card Reader
      Apple Inc. Apple Internal Keyboard / Trackpad
      Apple Computer, Inc. IR Receiver
      Apple Inc. BRCM2046 Hub
      Apple Inc. Bluetooth USB Host Controller
    Gatekeeper: ℹ️
      Anywhere
    Kernel Extensions: ℹ️
      /System/Library/Extensions
      [not loaded] com.driver.KUSBModemCDC07 (4.0.2) [Support]
      [not loaded] com.driver.KUSBModemDataA07 (4.0.2) [Support]
    Startup Items: ℹ️
      JHHPortDetect: Path: /Library/StartupItems/JHHPortDetect
      Sudochmod: Path: /Library/StartupItems/Sudochmod
      Startup items are obsolete in OS X Yosemite
    Launch Agents: ℹ️
      [not loaded] com.adobe.AAM.Updater-1.0.plist [Support]
      [running] com.bjango.istatmenusagent.plist [Support]
      [loaded] com.google.keystone.agent.plist [Support]
      [loaded] com.oracle.java.Java-Updater.plist [Support]
      [running] jp.co.canon.CUPSCAPT.BG.plist [Support]
      [loaded] org.macosforge.xquartz.startx.plist [Support]
    Launch Daemons: ℹ️
      [loaded] com.adobe.fpsaud.plist [Support]
      [invalid?] com.adobe.SwitchBoard.plist [Support]
      [running] com.bjango.istatmenusdaemon.plist [Support]
      [loaded] com.google.keystone.daemon.plist [Support]
      [loaded] com.microsoft.office.licensing.helper.plist [Support]
      [loaded] com.oracle.java.Helper-Tool.plist [Support]
      [loaded] com.oracle.java.JavaUpdateHelper.plist [Support]
      [loaded] org.macosforge.xquartz.privileged_startx.plist [Support]
      [loaded] org.tcpdump.chmod_bpf.plist [Support]
    User Launch Agents: ℹ️
      [loaded] com.adobe.ARM.[...].plist [Support]
    User Login Items: ℹ️
      iTunesHelper Application (/Applications/iTunes.app/Contents/MacOS/iTunesHelper.app)
      Caffeine Application (/Applications/Caffeine.app)
      AdobeResourceSynchronizer ApplicationHidden (/Applications/Adobe Reader.app/Contents/Support/AdobeResourceSynchronizer.app)
      Dropbox Application (/Applications/Dropbox.app)
      HyperDock Helper UNKNOWN (missing value)
    Internet Plug-ins: ℹ️
      o1dbrowserplugin: Version: 5.38.6.0 - SDK 10.8 [Support]
      Default Browser: Version: 600 - SDK 10.10
      AdobePDFViewerNPAPI: Version: 11.0.09 - SDK 10.6 [Support]
      FlashPlayer-10.6: Version: 15.0.0.246 - SDK 10.6 [Support]
      Flash Player: Version: 15.0.0.246 - SDK 10.6 Mismatch! Adobe recommends 16.0.0.235
      QuickTime Plugin: Version: 7.7.3
      googletalkbrowserplugin: Version: 5.38.6.0 - SDK 10.8 [Support]
      SharePointBrowserPlugin: Version: 14.0.0 [Support]
      AdobePDFViewer: Version: 11.0.09 - SDK 10.6 [Support]
      zako: Version: zako 1.0.0.0 - SDK 10.8 [Support]
      iPhotoPhotocast: Version: 7.0 - SDK 10.8
      JavaAppletPlugin: Version: Java 7 Update 71 Check version
    User internet Plug-ins: ℹ️
      BlueStacks Install Detector: Version: Unknown
    Safari Extensions: ℹ️
      AdBlock
      ClickToFlash
      Awesome Screenshot
      Breaking News
      The New York Times
    3rd Party Preference Panes: ℹ️
      Flash Player  [Support]
      Java  [Support]
    Time Machine: ℹ️
      Skip System Files: NO
      Mobile backups: ON
      Auto backup: YES
      Volumes being backed up:
      Arupreet: Disk size: 499.25 GB Disk used: 357.24 GB
      Destinations:
      CHIKKI [Local]
      Total size: 331.41 GB
      Total number of backups: 2
      Oldest backup: 2014-06-10 13:36:00 +0000
      Last backup: 2014-09-08 13:57:40 +0000
      Size of backup disk: Too small
      Backup size 331.41 GB < (Disk used 357.24 GB X 3)
    Top Processes by CPU: ℹ️
          8% python
          3% WindowServer
          3% uTorrent
          2% SystemUIServer
          0% mtmfs
    Top Processes by Memory: ℹ️
      1.29 GB JavaAppLauncher
      123 MB SystemUIServer
      102 MB iStatMenusDaemon
      86 MB com.apple.WebKit.WebContent
      81 MB WindowServer
    Virtual Memory Information: ℹ️
      50 MB Free RAM
      1.97 GB Active RAM
      1.90 GB Inactive RAM
      673 MB Wired RAM
      6.70 GB Page-ins
      8 MB Page-outs
    Diagnostics Information: ℹ️
      Dec 10, 2014, 10:48:11 AM Self test - passed
      Dec 9, 2014, 02:54:15 AM VLC_2014-12-09-025415_Arus-MacBook-Pro.crash

    Not sure if using Terminal would help:
    Launch Activity Monitor
    Select Memory tab
    Launch Terminal
    type sudo purge
    password
    10-15 sec later Terminal should refresh and show freed memory & cache

  • C240 M3 Stuck at "Configuring and testing memory .."

    Hi,
    This server's just been returned to us from Cisco, who had it on loan since it was new.   We're trying to put it back into service, but have hit the following problem.
    On first power-up the server gets as far as the "Configuring and testing memory .." message.  Just that message, it doesn't show any progress in actually testing memory.   After a few seconds it shuts itself down, then spins up again, repeating that a couple of times before sitting with the "Configuring and testing memory .." message at the top of the screen, but now also showing CIMC IP address at the bottom.   All four LEDs above the power button show steady green,  and the unit ID buttons switch the blue LED on/off as they should.
    I can get to the CIMC login screen, but the password's been changed from default so can't get any further in that direction until we find out the new user/password details.  Unless someone knows how to reset CIMC to default.
    I've tried the following recovery steps ..
    (1) If we set the "Clear CMOS" jumper J2065, the server won't power up.  It powers up to standby, but does not respond on pressing the power button.
    (2) Using the "BIOS recovery" jumper J2068 doesn't appear to have any effect, the server does not read the recovery file from USB flash drive.
    Any ideas?   
    Thanks, 
    Tony S

    Cheers.  There's not much to reseat at this stage.   The server came back with two CPUs of unknown type, I've removed and set those aside in case they're some sort of weird CPU that needs a special memory configuration.
    We've fitted a single E5-2609 as CPU1 and single DIMM in A1.  There are no PCI cards or anything else to reseat.    As a matter of fact the server behaves exactly the same if there's no memory at all, making me think it's hanging up before starting the memory check.
    I would love to get into the CIMC, but does anyone know a way to reset the username/password other than via the BIOS screens (which aren't accessible).
    Thanks, Tony S

  • K9A2 Platinum and 4 Memory Modules

    Hey gang, the saga continues.
    BIOS 1.2
    With Vista Enterprise x64 SP1 RC and 4x DDR2-800 OCZ modules (see my signature) my system will POST but not boot properly (even in safe mode!) at either 3-4-4-15-2T-2.4V or at 5-5-5-15-2T-2.4V.  It gets almost to the point where it wants to bring up the vista logo after loading all the drivers however then the screen resets to "no signal" and the system reboots from POST.
    I removed 2 of the memory modules, leaving 2 in the slots closest to the CPU.  At 3-4-4-15-2T-2.4V (which is what the memory is rated for) the ATI kernel driver gets a page fault during load, blue screen, memory dump.  However at 5-5-5-15-2T-2.4V the system is stable.  I expected 2 memory modules to work at the rated speed of the memory.  I expected 4 memory modules to work at looser timings.  I'll try 5-5-5-18-2T-2.4V with 4 modules just to see.
    I'm getting 8GB/s throughput in Sandra XII at 5-5-5-15-2T-2.4V.
    With BIOS P.0D I was getting 9.5GB/s at 5-5-5-18-2T-2.3V with the mushkin XP8500.
    Maybe P.0D doesn't have the erratum in it, and tighter memory controller timings.
    Oh and the Sandra disk benchmark test posted a RAID0 score of 140.5 MB/s throughput.  WD360JD was 55 MB/s.  I need to run a better benchmark though.  I bought EVEREST Personal Ultimate, maybe it'll have something more useful in it.  I can tell you the EVEREST benchmarks for memory performance on my system absolutely suck.  They're pinning it around midrange in all the tests. :<  I cannot run HDTach on this system because it doesn't recognize me as an Administrator (although I am one).
    I have my final water cooling parts arriving on Wednesday - an inline temperature sensor which will hang right off the egress on the video card stack, for accurate CPU + video card heat levels on the liquid for the fan control.
    At idle this system keeps the CPU at 99F temp, HD at 105F (I removed the front case fan, it would probably be cooler with it in there, but slightly noisier).  Memory therefore is probably around 102F.  I haven't gotten to stress testing yet because of the stability issues.
    I also am trying Catalyst 8.1 beta to see if CrossFireX will work.
    ** At least the system is POSTing BOOTing **   

    Quote from: MagnumMan on 15-January-08, 21:25:47
    AaronYuri: Using Vista Enterprise x64 SP1 RC, no fixes come up through Windows Update, I assume I have everything... point me to something that wouldn't be in the service pack RC?
    Quad: So you think with an X2 CPU this wouldn't be a problem, but the Phenom is inferior?
    Russ: I'm using fixed memory voltage as specified in the test.  2.4V and 2.1V.  Both of which should have worked.  Since I can do DDR2-800 2x 3-4-4-15-1T-2.4V stable (running Prime95 now...), I would expect to be able to do DDR2-533 5-5-5-18-2T-2.1V.  Also this board originally posted with the memory at DDR2-1066 5-7-7-20-2T-2.4V so I know the memory isn't the issue.
    One additional comment I would like to add to this discussion is that with all 4 memory modules loaded I can install the Vista operating system.  It is only after I reboot, after the initial install, that it won't complete the boot cycle any longer.  So the install boot works (which is probably a limited kernel?) but the real thing won't work.
    As for DDR2-400 I might give it a try but I have to say if that's the only way I could do 4gb memory, I wouldn't do it.
    Hello, I have the SAME sort of problems except with the K9A Platinum
    Here is the fix/update they are talking about
    http://support.microsoft.com/kb/929777/en-us
    I have applied it and did not work for me. You are getting a BSOD likely. Boot to 2gb, go to System Settings under Control Panel. Click Advanced Setting on the left. Then click Settings button under Startup and recovery. UN-check automatically restart. You may then see the BSOD when you try booting with 4gb again.
    I a using latest bios on my MSIK9A and I still cannot boot Windows to 4gb.
    I have read thru all 20 pages here:
    http://forums.microsoft.com/technet/showpost.aspx?postid=1292561&siteid=17&sb=0&d=1&at=7&ft=11&tf=0&pageid=10
    Even though I do not run 64bit, this still seems to be a very common problem with running 4gb on 32bit and 64bit. It is not just a Windows problem. I have read Linux has exhibited this as well.
    I even did a clean install of Vista on a spare drive last night with only 2gb installed. I then updated all drivers in order and then applied MS Hotfix I linked to above. I shutdown, put in all 4gb and BAM!! same exact BSOD. I have tried setting timings to many different settings. I have tried all "suggested fixes" to no avail. All 4gb of Memory all passes memtest86 v1.7 scans. Ran 17 passes overnight and all passed.

  • Difference between free and inactive memory?

    I'm really just wondering what the difference is between inactive, and free memory. Right now, I have about 13MB of free memory, and 381MB of inactive memory. Is the inactive memory just on reserve in case the computer absolutely needs it? Is there any way to utilize this "inactive" memory to speed up the computer? Thanks.

    Read the following:
    <font "size=+1">About OS X Memory Management and Usage
    Reading system memory usage in Activity Monitor
    Memory Management in Mac OS X
    Performance Guidelines- Memory Management in Mac OS X
    A detailed look at memory usage in OS X
    Understanding top output in the Terminal
    The amount of available RAM for applications is the sum of Free RAM and Inactive RAM. This will change as applications are opened and closed or change from active to inactive status. The Swap figure represents an estimate of the total amount of swap space required for VM if used, but does not necessarily indicate the actual size of the existing swap file. If you are really in need of more RAM that would be indicated by how frequently the system uses VM. If you open the Terminal and run the top command at the prompt you will find information reported on Pageins () and Pageouts (). Pageouts () is the important figure. If the value in the parentheses is 0 (zero) then OS X is not making instantaneous use of VM which means you have adequate physical RAM for the system with the applications you have loaded. If the figure in parentheses is running positive and your hard drive is constantly being used (thrashing) then you need more physical RAM.

  • In OSX Activity Monitor, what's the difference between 'free' memory and 'inactive' memory

    In OS X Activity Monitor, what's the difference between 'free' memory and 'inactive' memory. My daughters 2Gb MacBook Pro is very slow, it probably needs more memory but there is almost 1Gb of 'inactive' memory but no 'free' memory when an application is opened.
    Thanks

    Free RAM is the one that has not been used by any application since you started up your Mac, and inactive RAM is the one that was used by an application and it is not in use anymore.
    1 GB of inactive RAM is a lot, and it may be the cause of the slowness. There are a lot of apps that allows you to turn inactive into free RAM. I use FreeMemory, but have a look at the Mac App Store.
    If you are a developer, you can do that with a command you can type into Terminal:
    sudo purge

  • HI, I HAVE A MacBook Pro 2.3GHz dual-core Intel i5 AND I WAN'T TO UPGRADE THE HARD DRIVE UP TO 750GB AND ALSO THE RAM MEMORY TO 8GB. WHAT SPECIFIC MODEL OF HARD DRIVE AND RAM MEMORY SHOULD I BUY??? THANKS

    HI, I HAVE A MacBook Pro 2.3GHz dual-core Intel i5 AND I WAN'T TO UPGRADE THE HARD DRIVE UP TO 750GB AND ALSO THE RAM MEMORY TO 8GB. WHAT SPECIFIC MODEL OF HARD DRIVE AND RAM MEMORY SHOULD I BUY??? THANKS

    No need to type in all caps - we HEAR you!
    I would take a look at the internal drives offered by both Crucial (click the link "Internal Hard Drives Now Available") and OWC. I would stay away from Western Digital drives as they seem to have problems on a number of Mac models.
    You can also shop for RAM at Crucial and OWC - just select the System Scanner tab at the Crucial website to find out which memory is right for your machine.
    Good luck,
    Clinton

  • 648 max , testing base and extended memory

    I dont see the thread i answered to one time that someone spoke of using ddr400 with 648 max or max-L board and they were getting testing base and extended memory error from the LED's.  Well i just got the same error today and my system would not boot i cut the power to the PS. and turned it back on it would start to boot and hang i could barely get to the windows logo sometimes the vid card wouldnt even boot the logo to the screen. This is with an updated mobo that msi sent me that i had just put in , it seemed to run fine at first then this problem started occuring.  The only difference i had in the setup from the previous outdated board was i had the mem in DIMM 3 and not DIMM 1, so i moved the memory back over to DIMM 3 and now the problem is gone. Just something for those of you with the same problem to try.
    Oh and i forgot one more issue, i cannot set the dram speed in the bios manually i have ddr 333 it should be 167 mhz so i set it to 4/5  and the system will not boot at all  i end up having to reset cmos.  I called MSI about that and they told me to just have it set to SPD , I said i know that and im fine with leaving it that way but it should let me set it manually if i wanted to and that i wondered if that had anything to do with the random " testing base and extended memory " problem.

    It was probably myt thread...
    http://www.msi.com.tw/program/e_service/forum/viewindex.php?threadid=6204&boardid=10&styleid=1
    Have done some testing with both DDR333 and DDR400 and my results are in the thread.
    Right no I'm using my DDR400 as DDR333, manually set to 167MHz, using DIMM1, and havn't seen any problems. I'll try the DIMM3 to see if I get any changes.
    And by the way.. I tried setting my DDR400 manually to 200MHz and it wouldn't boot at all. After a lot of ugly language I finally got it back to the BIOS....after a reset of the CMOS.
    Seams like you should use SPD if you want to use the correct freq for your RAM.
    Have you tested the new 1.3 BIOS?

  • Examples for SAP Memory and ABAP Memory

    Hi all,
        can u give me one example of sap memory and abap memory.
                                              Ranjith

    Hi,
    <b>SAP Memory</b>
    SAP memory is a memory area to which all main sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another. Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters can be set either for a particular user or for a particular program at the time of logon using the SET PARAMETER statement. Other ABAP programs can then retrieve the set parameters using the GET PARAMETER statement. The most frequent use of SPA/GPA parameters is to fill input fields on screens .
    <b>example:</b>
    ABAP programs can access the parameters using the SET PARAMETER and GET PARAMETERstatements.
    To fill one, use:
    SET PARAMETER ID pid FIELD f
    This statement saves the contents of field f under the ID pid in the SAP memory. The ID pid can be up to 20 characters long. If there was already a value stored under pid, this statement overwrites it. If you double-click pid in the ABAP Editor, parameters that do not exist can be created as a Repository object.
    To read an SPA/GPA parameter, use:
    GET PARAMETER ID pid FIELD f.
    This statement places the value stored under the pid ID into the variable f. If the system does not find any value for pid in the SAP memory, sy-subrc is set to 4. Otherwise, it sets the value to 0.
    <b>ABAP Memory</b>
    ABAP memory is a memory area that all ABAP programs within the same internal session can access using the EXPORT and IMPORT statements. Data within this memory area remains throughout a sequence of program calls, with the exception of LEAVE TO TRANSACTION. To pass data to a program that you are calling, the data needs to be placed in ABAP memory before the call is made from the internal calling session using the EXPORT statement. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory using the IMPORT statement. If control is then returned to the program that made the initial call, the same procedure operates in reverse.If a transaction is called using LEAVE TO TRANSACTION, the ABAP memory and the call stack are deleted. They cannot be used for data transfer.
    Since objects belonging to ABAP objects can only be accessed within an internal session, it does not make sense and is therefore forbidden (from a syntax point of view) to pass a reference to an object to a calling program through the ABAP memory.
    <b>Example:</b>
    Export hello to memory id 'Hello_world'.
    Import hello from memory id 'Hello_world'
    Regards
    Sudheer

Maybe you are looking for