Memory allocation profiling - where is it going?

I am profiling a Swing application that seems to be using more memory than expected - Windows task manager (which I don't necessarily trust) reports that the Java process hogs 400MB+ of memory. However, profiling with JProfiler indicates that heap usage is 106MB with a total heap size of 112MB, which is in line with expectations. Is it possible that memory is being allocated in such a way that it does not show up on the heap, by Swing or some other program component? Or is task manager telling me lies?

Ataru wrote:
georgemc wrote:
What actually is your problem? The imbalance between what task manager says your process is using and what the profiler says your heap is using?Yes, more or less.Keep in mind, too, that the JVM is free to a) Never GC until it's about to throw an OutOfMemoryError, and b) Never give anything back to the OS, even on GC.
The problem is not that any OutOfMemory errors are being generated, but that this application needs to run on machines with 512 MB of RAM, so we would like to keep its footprint to a minimum - 400 MB is more than we can afford performance-wise.How far down can you crank -Xmx before you do get OOME? If you can go small enough to run on your target hardware, you're good to go. If not, you've got some more research to do, followed by some refactoring.

Similar Messages

  • Dynamic memory allocation failure

    Dear reader,
    We sometimes have a problem where our windows 2012 r2 RDS virtual servers, that reside on windows 2012r2 hyper-v hosts, loose their dynamic memory and only have their startup memory left to work with. Users start complaining that things are very slow etc.
    If I check several screens (RDS Broker load balancing, hyper-v manager, cluster manager and the vm's task manager) it's clear that the vm only has its startup memory allocated. I'm not sure if this happens instantly or immidiatly after the nightly reboot.
    To resolve the problem we have to call all users on the vm where it happens and ask them to logoff (if they are even able to), and then we reboot the machine.
    I have checked the logs from the machine where the VM resides on and the logs from the vm itself. But I cannot find anything. We also have alot of windows 2008r2 vm's with dynamivc memory, but none of those have ever had this problem.
    Searched the internet, but so far it seems we are only.
    Can anyone give me a lead to troubleshoot this?
    Best regards,
    Ruud Boersma
    MCITP Enterprise administrator

    Hi all,
    I'm going to be "one of those people" who revives dead posts for something that is relevant but obviously not fixed... sorry in advance!
    We have the exact same situation, a bunch of RDSH guests with Dynamic memory turned on (60+ of them). every day between 1-8 of them will fail to allocate Dynamic memory and will be stuck on their startup RAM amount. This really hurts our users at peak
    times.
    I have engaged our TAM and have raised a case with PSS, Usual story "your the only one with this problem". Which obviously isn't true.
    So, we have tons of free RAM on the hosts, 600GB+ on most of them, the issue affects RDSH hosts at random, across multiple hosts and clusters.
    The screen shots attached are of one of our hosts from this morning. it has 8GB startup, 8GB minimum, 32GB Maximum RAM configured, with a 23% buffer. the host has 752GB RAM FREE. Notice how the perf counter "Hyper-V Dynamic Memory Integration Service"
    is reporting "0", it should be reporting "32768". also under task manager on the VM we are missing "Maximum memory" which should be just below "Hardware reserved" in the bottom right hand corner.
    Looks like the balloon driver is being delayed at boot time, we are going to XPerf all the servers in the hope that we can catch the critter. It's an unusual problem.
    We only have Acrobat PDF viewer, word viewer, excel viewer and two custom dot.NET applications installed on the guests. Some of the servers are also just dumb RDSH hosts, with not connection broker configured, using an F5 loadbalancer for load distribution
    and session management. All guests are 2012R2 patched up to March 2015, integration Services are installed and up to date (its an enlightened OS remember).

  • Problem in dynamic memory allocation

    Hi,
    My name is Ravi Kumar. I'm working on a project to improve organizational performance which include visual studio for simulation. I'm using dynamic memory allocation to allocate space for the array that are used in the program. Now I have run-time error
    which I can't understand where it is going wrong. Can someone please help me regrading this issue. 
    If anyone interested in helping please leave a comment with your email id so that I will share the whole project folder.
    Thanks,
    Ravi

    Hi Ravi,
    Don is right that this is the forum to discuss questions and feedback for Microsoft Office client.
    Please post in MSDN forum of Visual Studio, where you can get more experienced responses:
    https://social.msdn.microsoft.com/Forums/en-US/home?forum=visualstudiogeneral
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    Regards,
    Ethan Hua
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Memory Allocation to JVM

    Hi
    How do I allocate Contiguous memory space to JVM 1.3 in Windows and AIX?
    Regards
    Sudhindra

    Hi
    You are right. But the issues here is performance
    enhancement. I feel that when we are talking about
    huge volumes of data and transaction performance will
    be enhanced if the memory allocated is contigous.
    As far as I know all modern platforms use virtual addressing. The overhead of that applies regardless of layout of physical memory. So I am not sure how contiguous blocks would help.
    So can you please tell me how to do this? Where can i
    get more information about this?
    Like I said maybe it is specific to your platform. If so you need to look to the docs about your platform. And the only way you are going to get any advantage from java objects from that is if you write your own jvm.

  • IOS app crashes on return from cameraUI - a memory allocation problem?

    hey all
    trying to finish my first app
    when running on iOS, the app SOMETIMES crashes after returning from cameraUI (either "use"/MediaEvent.COMPLETE or "cancel"/Event.CANCEL).
    when i exit some other running apps on my iPhone 3Gs (and not that many are open), the problem goes away, which makes me think this is some memory allocation problem
    in that aspect, can i trust the iOS to exit inactive applications to allocate more memory for my, currently active, AIR app?
    (there is no memory leak)
    this is an iPhone 3Gs running os version 4.3.5
    the app was made with Flash Pro 5.5 overlayed with the AIR 3.1 sdk, and deployed using the "deploy for app store" type (which should be the most bug-free)
    (no crashes on Android or desktop versions)
    anyone had this cameraUI problem or a similar one where an app crashes if more then some numbers of apps are open?
    thanx
    Saar

    I don't get this. Its beyond frustrating:
    we are not talking about using an uncommon phone capability, access to a phones camera is about the most basic native level of access you would be looking for in a mobile framework
    we are not talking about an edge case in usage, just trying to take a simple picture consistently
    we are not talking about a feature issue where it doesn't quite work the way you want, it crashes the whole app hard! 
    we are not talking about a hard to recreate, only happening to a few people case - it seems from what I have read the Camera integration is fundamentally broken and I have spent days researching this and only found frustration from people out there
    we are not talking about an issue that does not have consequences - in several places on this forum and others people have emphasized how it is affecting their platform decisions, ability to submit apps. You even have people on this board recommending that not to use Flex Mobile and move to other platforms. Not what you want to be happening to when you are at the adoption phase of a new product.
    And that is the response - on this thread and here http://forums.adobe.com/message/4125590#4125590 - we know its an issue but we don't know when it will be fixed and no proactive communication on status - only a growing body of people like me getting increasingly frustrated. What does it take for an issue to be a show stopper? priority 1? affecting customer decisions priority?
    In my case I am in place where I am trying to make a platform decision and since this experience has happened I have subscribed to the live feed for this forum and as many relevant Adoble blogs, news feed etc. as I could find. I did this to get a feel for how well Adobe is supporting the mobile development on the AIR platform. Something increasingly important given recent decisions.
    My perception so far is quite poor especially for a recently released product, i.e. 4.6 release. In fact the release that finally addresses performance enough to make AIR mobile development a risk free decision. You would expect Adobe to be all over the boards like this - with core developers, platform experts contributing actively. My perception, rightly or wrongly, is of a community trying to support itself without much help, or clear communication from Adobe. In fact if you look at the the articles coming out of Adobe recently its all phonegap, html5 etc. It does not fill you with confidence for the future.
    To be clear - I have had a great experience with actionscript, flex etc and as a company we have developed the backend portion of our platform solely on Flex. I don't believe that we could have done it any other way and even now when I look at the alternatives for web development I feel vindicated in our decision.
    However, this rant is caused by a genuine frustration and fear. I don't expect this to get a meaningful response but maybe if there are enough voices it will create an overall improvement.
    Sean

  • ICMP Timeout Alarm due to TCP Protocol Memory Allocation Failure ?

    Hello Experts ,
      >> Device uptime suggests there was no reboot
    ABCSwitch uptime is 28 weeks, 13 hours, 50 minutes
    System returned to ROM by power-on
    System restarted at 13:09:45 UTC Mon Aug 5 2013
    System image file is "flash:c2950-i6k2l2q4-mz.121-22.EA12.bin"
    >> But observed logs mentioning Memory Allocation Failure for TCP Protocol Process ( Process ID 43) due to Memory Fragmentation
    003943: Feb 18 02:14:27.393 UTC: %SYS-2-MALLOCFAIL: Memory allocation of 36000 bytes failed from 0x801E876C, alignment 0
    Pool: Processor Free: 120384 Cause: Memory fragmentation
    Alternate Pool: I/O Free: 682800 Cause: Memory fragmentation
    -Process= "TCP Protocols", ipl= 0, pid= 43
    -Traceback= 801C422C 801C9ED0 801C5264 801E8774 801E4CDC 801D9A8C 8022E324 8022E4BC
    003944: Feb 18 02:14:27.397 UTC: %SYS-2-CFORKMEM: Process creation of TCP Command failed (no memory).
    -Process= "TCP Protocols", ipl= 0, pid= 43
    -Traceback= 801E4D54 801D9A8C 8022E324 8022E4BC
    According to Cisco documentation for Troubleshooting Memory issues on Cisco IOS 12.1 (http://www.cisco.com/c/en/us/support/docs/ios-nx-os-software/ios-software-releases-121-mainline/6507-mallocfail.html#tshoot4 ), which suggests the TCP Protocols Process could not be started due to Memory being fragmented
    Memory Fragmentation Problem or Bug
    This situation means that a process has consumed a large amount of processor memory and then released most or all of it, leaving fragments of memory still allocated either by this process, or by other processes that allocated memory during the problem. If the same event occurs several times, the memory may fragment into very small blocks, to the point where all processes requiring a larger block of memory cannot get the amount of memory that they need. This may affect router operation to the extent that you cannot connect to the router and get a prompt if the memory is badly fragmented.
    This problem is characterized by a low value in the "Largest" column (under 20,000 bytes) of the show memory command, but a sufficient value in the "Freed" column (1MB or more), or some other wide disparity between the two columns. This may happen when the router gets very low on memory, since there is no defragmentation routine in the IOS.
    If you suspect memory fragmentation, shut down some interfaces. This may free the fragmented blocks. If this works, the memory is behaving normally, and all you have to do is add more memory. If shutting down interfaces doesn't help, it may be a bug. The best course of action is to contact your Cisco support representative with the information you have collected.
    >>Further TCP -3- FORKFAIL logs were seen
    003945: Feb 18 02:14:27.401 UTC: %TCP-3-FORKFAIL: Failed to start a process to negotiate options.
    -Traceback= 8022E33C 8022E4BC
    003946: Feb 18 02:14:27.585 UTC: %TCP-3-FORKFAIL: Failed to start a process to negotiate options.
    -Traceback= 8022E33C 8022E4BC
    003947: Feb 18 02:14:27.761 UTC: %TCP-3-FORKFAIL: Failed to start a process to negotiate options.
    -Traceback= 8022E33C 8022E4BC
    003948: Feb 18 02:14:27.929 UTC: %TCP-3-FORKFAIL: Failed to start a process to negotiate options.
    -Traceback= 8022E33C 8022E4BC
    003949: Feb 18 02:14:29.149 UTC: %TCP-3-FORKFAIL: Failed to start a process to negotiate options.
    -Traceback= 8022E33C 8022E4BC
    According to Error Explanation from Cisco Documentation (http://www.cisco.com/c/en/us/td/docs/ios/12_2sx/system/messages/122sxsms/sm2sx09.html#wp1022051)
    suggests the TCP handles from a client could not be created or initialized
    Error Message %TCP-3-FORKFAIL: Failed to start a process to negotiate options.
    Explanation The system failed to create a process to handle requests  from a client. This condition could be caused by insufficient  memory.
    Recommended Action Reduce other system activity to ease  memory demands.
    But I am still not sure about the exact root cause is as
    1.The GET/GETNEXT / GET BULK messages from SNMP Manager (Here, IBM Tivoli Netcool  ) uses default SNMP Port 161 which is
       UDP and not TCP
    2. If its ICMP Polling failure from IBM Tivoli Netcool , ICMP is Protocol Number 1 in Internet Layer of TCP/IP Protocol Suite  and TCP is Protocol                 Number 6 in the Transport Layer of TCP/IP Protocol Suite .
    So I am still not sure how TCP Protocol Process Failure could have caused ICMP Timeout . Please help !
    Could you please help me on what TCP Protocol Process handles in a Cisco Switch ?
    Regards,
    Anup

    Hello Experts ,
      >> Device uptime suggests there was no reboot
    ABCSwitch uptime is 28 weeks, 13 hours, 50 minutes
    System returned to ROM by power-on
    System restarted at 13:09:45 UTC Mon Aug 5 2013
    System image file is "flash:c2950-i6k2l2q4-mz.121-22.EA12.bin"
    >> But observed logs mentioning Memory Allocation Failure for TCP Protocol Process ( Process ID 43) due to Memory Fragmentation
    003943: Feb 18 02:14:27.393 UTC: %SYS-2-MALLOCFAIL: Memory allocation of 36000 bytes failed from 0x801E876C, alignment 0
    Pool: Processor Free: 120384 Cause: Memory fragmentation
    Alternate Pool: I/O Free: 682800 Cause: Memory fragmentation
    -Process= "TCP Protocols", ipl= 0, pid= 43
    -Traceback= 801C422C 801C9ED0 801C5264 801E8774 801E4CDC 801D9A8C 8022E324 8022E4BC
    003944: Feb 18 02:14:27.397 UTC: %SYS-2-CFORKMEM: Process creation of TCP Command failed (no memory).
    -Process= "TCP Protocols", ipl= 0, pid= 43
    -Traceback= 801E4D54 801D9A8C 8022E324 8022E4BC
    According to Cisco documentation for Troubleshooting Memory issues on Cisco IOS 12.1 (http://www.cisco.com/c/en/us/support/docs/ios-nx-os-software/ios-software-releases-121-mainline/6507-mallocfail.html#tshoot4 ), which suggests the TCP Protocols Process could not be started due to Memory being fragmented
    Memory Fragmentation Problem or Bug
    This situation means that a process has consumed a large amount of processor memory and then released most or all of it, leaving fragments of memory still allocated either by this process, or by other processes that allocated memory during the problem. If the same event occurs several times, the memory may fragment into very small blocks, to the point where all processes requiring a larger block of memory cannot get the amount of memory that they need. This may affect router operation to the extent that you cannot connect to the router and get a prompt if the memory is badly fragmented.
    This problem is characterized by a low value in the "Largest" column (under 20,000 bytes) of the show memory command, but a sufficient value in the "Freed" column (1MB or more), or some other wide disparity between the two columns. This may happen when the router gets very low on memory, since there is no defragmentation routine in the IOS.
    If you suspect memory fragmentation, shut down some interfaces. This may free the fragmented blocks. If this works, the memory is behaving normally, and all you have to do is add more memory. If shutting down interfaces doesn't help, it may be a bug. The best course of action is to contact your Cisco support representative with the information you have collected.
    >>Further TCP -3- FORKFAIL logs were seen
    003945: Feb 18 02:14:27.401 UTC: %TCP-3-FORKFAIL: Failed to start a process to negotiate options.
    -Traceback= 8022E33C 8022E4BC
    003946: Feb 18 02:14:27.585 UTC: %TCP-3-FORKFAIL: Failed to start a process to negotiate options.
    -Traceback= 8022E33C 8022E4BC
    003947: Feb 18 02:14:27.761 UTC: %TCP-3-FORKFAIL: Failed to start a process to negotiate options.
    -Traceback= 8022E33C 8022E4BC
    003948: Feb 18 02:14:27.929 UTC: %TCP-3-FORKFAIL: Failed to start a process to negotiate options.
    -Traceback= 8022E33C 8022E4BC
    003949: Feb 18 02:14:29.149 UTC: %TCP-3-FORKFAIL: Failed to start a process to negotiate options.
    -Traceback= 8022E33C 8022E4BC
    According to Error Explanation from Cisco Documentation (http://www.cisco.com/c/en/us/td/docs/ios/12_2sx/system/messages/122sxsms/sm2sx09.html#wp1022051)
    suggests the TCP handles from a client could not be created or initialized
    Error Message %TCP-3-FORKFAIL: Failed to start a process to negotiate options.
    Explanation The system failed to create a process to handle requests  from a client. This condition could be caused by insufficient  memory.
    Recommended Action Reduce other system activity to ease  memory demands.
    But I am still not sure about the exact root cause is as
    1.The GET/GETNEXT / GET BULK messages from SNMP Manager (Here, IBM Tivoli Netcool  ) uses default SNMP Port 161 which is
       UDP and not TCP
    2. If its ICMP Polling failure from IBM Tivoli Netcool , ICMP is Protocol Number 1 in Internet Layer of TCP/IP Protocol Suite  and TCP is Protocol                 Number 6 in the Transport Layer of TCP/IP Protocol Suite .
    So I am still not sure how TCP Protocol Process Failure could have caused ICMP Timeout . Please help !
    Could you please help me on what TCP Protocol Process handles in a Cisco Switch ?
    Regards,
    Anup

  • Memory allocation in CS 5.5

    First time to the forum and a relatively new user in AE.
    Here's my error message:
    "Memory allocation of 9.2 GB exceeds internal limits. Decrease the memory requirements for the rendering of this frame (12802). For more info: www.adobe/com/go/learn_ae_mem"
    So here's where the confusion sets in:
    a) I've gone through the forums and tweaked the multiprocessing settings... still get the same error.
    b) I've changed the color bit depth to 8 (mentioned in another posting)
    My comp is a full HD animation simulating a walk through a hallway. There's roughly 14 elements in the composition and the camera movement is a pan in. 
    I hope this is enough information to get the ball rolling. If more info is needed, I'll do my best to get you what you need.
    Thanks!

    Below are screen shots of the aforementioned settings. I receive the error as I scrub to 00;00;20 on the composition. The message displays as a large .jpg file begins to rotate out and another .jpg file rotates in. I've used a camera to pan in on this elements' transitions but am not using any effects directly. I hope this helps!
    -Kyle

  • How can I get the memory allocation info of a java thread?

    Now I am going to write a program to monitor the execution condition of the java threads. But it seems that the classes in standard edition of JDK does not provide facilities to get the information such as the memory allocation and CPU time of a running thread. How can I do with it? Can I use JNI or JVMDI to get them? If it could do, how?

    Thanks a lot. I just browsed the specification of jvmpi. It is interesting and it seems that I can get the information I need. However, if I want to get the information in my program, I mean, if I want to build a class which may use JNI method to invoke the function written with JVMPI, and then forward the data to other upper layer objects, can it be done?

  • Internal Table Memory Allocation

    Hello all,
    I could understand the difference between Internal Table with occurs 0 and internal table with type declaration...
    correct me if i am wrong, occurs 0 declaration occupies 8kb memory and header line 256 bytes...
    But what i could not get is...
    Where can i view this internal table runtime memory usage?? Should i have to check that in some transaction???
    If that is the case, what transaction i should look at?? Can i view this in debugging mode??? I tried GOTO -> STATUS DISPLAY -> MEMORY USE and i have tried even SETTINGS -> MEMORY MONITORING ->MEMORY DISPLAY ON...Nothing worked..
    when i go for GOTO -> STATUS DISPLAY -> MEMORY USE in debugging
    memory allocated seems to be same for Internal table with occur 0 and Internal table with type declaration
    I have searched a lot about this in SDN....But could not come to a conclusion......
    I don't have authorisation here for DBG_MEMORY_DIFFTOOL or S_MEMORY_INSPECTOR unfortunately.....
    Waiting for your replies....

    Hi Jagannathan,
    You can view this on Debugger(ECC6.0) onwards.
    To find out how much memory internal tables occupy, choose Goto --> Display Condition --> Memory Usage.
    Choose Change Settings to display a window, in which you can choose the Internal Tables button.
    Hope this will assists you for your quest.
    Regards,
    -Syed.

  • Templates and Dynamic Memory Allocation Templates

    Hi , I was reading a detailed article about templates and I came across the following paragraph
    template<class T, size_t N>
    class Stack
    T data[N]; // Fixed capacity is N
    size_t count;
    public:
    void push(const T& t);
    };"You must provide a compile-time constant value for the parameter N when you request an instance of this template, such as *Stack<int, 100> myFixedStack;*
    Because the value of N is known at compile time, the underlying array (data) can be placed on the run time stack instead of on the free store.
    This can improve runtime performance by avoiding the overhead associated with dynamic memory allocation.
    Now in the above paragraph what does
    "This can improve runtime performance by avoiding the overhead associated with dynamic memory allocation." mean ?? What does template over head mean ??
    I am a bit puzzled and i would really appreciate it if some one could explain to me what this sentence means thanks...

    The run-time memory model of a C or C++ program consists of statically allocated data, automatically allocated data, and dynamically allocated data.
    Data objects (e.g. variables) declared at namespace scope (which includes global scope) are statically allocated. Data objects local to a function that are declared static are also statically allocated. Static allocation means the storage for the data is available when the program is loaded, even before it begins to run. The data remains allocated until after the program exits.
    Data objects local to a function that are not declared static are automatically allocated when the function starts to run. Example:
    int foo() { int i; ... } Variable i does not exist until function foo begins to run, at which time space for it appears automatically. Each new invocation of foo gets its own location for i independent of other invocations of foo. Automatic allocation is usually referred to as stack allocation, since that is the usual implementation method: an area of storage that works like a stack, referenced by a dedicated machine register. Allocating the automatic data consists of adding (or subtracting) a value to the stack register. Popping the stack involves only subtracting (or adding) a value to the stack register. When the function exits, the stack is popped, releasing storage for all its automatic data.
    Dynamically allocated storage is acquired by an explicit use of a new-expression, or a call to an allocation function like malloc(). Example:
    int* ip = new int[100]; // allocate space for 100 integers
    double* id = (double*)malloc(100*sizeof(double)); // allocate space for 100 doublesDynamic storage is not released until you release it explicitly via a delete-expression or a call to free(). Managing the "heap", the area from where dynamic storage is acquired, and to which it is released, can be quite time-consuming.
    Your example of a Stack class (not to be confused with the program stack that is part of the C or C++ implementation) uses a fixed-size (that is, fixed at the point of template instance creation) automatically-allocated array to act as a stack data type. It has the advantage of taking zero time to allocate and release the space for the array. It has the disadvantages of any fixed-size array: it can waste space, or result in a program failure when you try to put N+1 objects into it, and it cannot be re-sized once created.

  • Dynamic memory allocation

    Hi, guys, does anyone know whether I can use dyanmic memory allocation on the Real time system with "call library function" node. DLL is programmed using C language. Thanks.
    Machman

    You certainly can. LabVIEW Real-Time functionality is really not much different than what you can do on Windows. The only difference being that you can now assign priorty and timing to your execution loops; essentially, you have determinism with RT whereas with Windows, you never have a guarantee.
    Thus, in regards to calling a dll, you can perform this the same way you would in LabVIEW for Windows. Here's a KnowledgeBase article on how to do this if you're not already familiar.
    Cheers,
    Emilie K. | Applications Engineer | National Instruments

  • Variable scope & memory allocation.

    Traditional wisdom normally says keep variables in the smalled scope you can (or atlest I think it does, feel free to correct me if I'm wrong from the offset).
    However memory allocation on J2ME is going to be slow. So...
              int noRects = readCard32();
              int pixel = readCard8();
              drawOnMe.draw( (pixel >>0 &7) * 36, (pixel >>3 &7) * 36,
                          (pixel >>6 &3) * 85, mx, my, w, h );
              for( int r = 0; r<noRects; r++ ) {
                  pixel = readCard8();
                  int lx = readCard8();
                  int ly = readCard8();
                  int lw = readCard8();
                  int lh = readCard8();
                  drawOnMe.draw( (pixel >>0 &7) * 36, (pixel >>3 &7) * 36,
                           (pixel >>6 &3) * 85, mx + lx, my + ly,
                           lw, lh );            
    // or
              int noRects = readCard32();
              int pixel = readCard8();
              drawOnMe.draw( (pixel >>0 &7) * 36, (pixel >>3 &7) * 36,
                          (pixel >>6 &3) * 85, mx, my, w, h );
              int lx;
              int ly;
              int lw;
              int lh;
              for( int r = 0; r<noRects; r++ ) { /* ... */ }Mike

    And as far as the difference - even though I'm not sure there is a performance increase, I'm sure that declaring them outside has no negative effects so I do it just in case.
    Plus, I remember reading somewhere that Java had some optimized access support for the first 4 (I think it's 4, and I think it also include the parameters) locals declared in a function, some kind of "fast register" thingie - so in functions that have tight inner loops I always declare the most "accessed" variables right at the top of the function. I don't know how much this holds true for KVMs, but again, it can't hurt.
    shmoove

  • Memory allocation much more than size of table TST03

    Hi all,
    I found a strange situation, in our system, memory allocation in SP12 shows 2GB is used in DB side, but when I go to transaction DB02 to check the table TST03, it only has 50MB. Our parameter rspo/store_location is already set to 'db'.
    System environment is: ECC6 running on AIX 53/Oracle 10g, 64bit.
    In my opinion, temse data will be stored in TST03, so I think TST03 size should be larger than memory allocation result in SP12.
    Could you please help me about this?
    Thanks and regards

    Hi Justin
    Nice question, really made me think. I just checked, in the newer SAP versions, TST03 has a BLOB column, in the older versions there was a LONG RAW col.
    I bet you have the BLOB (ECC6), you can check in sqlplus:
    [code]SQL> desc sapsr3.tst03
    Name                                      Null?    Type
    DCLIENT                                   NOT NULL VARCHAR2(9)
    DNAME                                     NOT NULL VARCHAR2(60)
    DPART                                     NOT NULL NUMBER(5)
    DROWNO                                    NOT NULL NUMBER(10)
    DDATALEN                                  NOT NULL NUMBER(5)
    DCONTENT                                           BLOB[/code]
    A lob column is stored in a seperate segment:
    [code]SQL> select SEGMENT_NAME from dba_lobs where table_name = 'TST03';
    SEGMENT_NAME
    SYS_LOB0000031954C00006$$[/code]
    Just replace your segment_name to get the size, you can enter the segment in DB02 too:
    [code]SQL> select BYTES/1024/1024 "SIZE_MB" from dba_segments where segment_name = 'SYS_LOB0000031954C00006$$';
       SIZE_MB
            12[/code]
    Regards
    Michael

  • LabVIEW Memory Allocation

    Hey,
    Is it possible to allocate predefined RAM Memory and accumulate data's into it?
    Before going in to detail – I am currently looking to write the inspection results in database for statistical analysis. I hope it will always consume some time to write it in database for each component / iteration. So decided to accumulate all the data in memory and write it at one shot.
    In detail, user has to inputs the memory size via front panel control. Let us assume for writing 1 row of string information occupies “XX” bytes. (Not yet sure how to calculate memory size of 1D string array of 10 elements (max of 20 character in each string)). Dividing the user input memory size with 1 row of memory size will give how many rows we can write at maximum say “N”.
    Use the for loop with “N” iteration and accumulates the 1D info to 2D array of information (auto indexing) and write it in Database at one shot.
    Any help or direction may helps a lot. 
    Waiting for the reply 
    Sasi.
    Certified LabVIEW Associate Developer
    If you can DREAM it, You can DO it - Walt Disney

     As far I know LabVIEW internally handles the memory allocation and we don't have any option to allocate it. There might be a way by using a windows dll but no direct function atleast.
    As you said you are going to use the for loop, in this case LabVIEW pre-allocates the memory depending on the data type and you don't have to worry about that. For details about the memory according to the data type you can check this link.
    The best solution is the one you find it by yourself

  • How can I measure memory allocation of a Java Application?

    We built a web application that enables images to be loaded into a database through a servlet running on Tomcat. We have inconsistent behaivor when more than x number of people are loading images simultaneously. No doubt a memory allocation problem, but how can I measure it?
    For example, I'd like to be able to create a graph showing the resources used against the number of people making uploads. I am using Linux and Tomcat/Apache.
    I am hoping for something like Memory counters that are available for measurine Windows applications on MS Windows - comes with the Resource Kit. Does this type of tool exist for the Java/Linux market?

    It is difficult to gauge memory usage from a Java application as the JVM handles garbage collection and even if objects are not referenced they might still be sitting in memory until the next garbage collect.
    Anyhow, a way to query available memory is:
    Runtime.getRuntime().freeMemory()
    You can run this at the begining of a process and at the end and examine the difference. You should call System.gc() before each freeMemory() call in order to try to force garbage collection.
    Another method would be to turn to the underlying OS. On linux you could use 'top' or 'ps'. With ps you could do something like:
    ps -o rss,vsz,%mem <pid>
    Where <pid> is the parent Tomcat process' id. The resulting three columns are:
    - Amount of real memory used.
    - Amount of virtual memory used.
    - Percentage of real memory used.
    'man ps' wil give you more options on how to use ps.
    There are also fancy graphical stuff like 'gtop' as well.
    Hope this helps.

Maybe you are looking for

  • Withholding tax line items are not post

    Hi, I was configured all the steps for extended withholding tax up to Assign withholding tax to vendor master data and the i am used to post an vendor invoice given all required feild and press enrer and display the withhoding tax codes screen here a

  • Pop up players won't play on my mac book pro anymore

    I used to be able to listen to music/shows on npr and sites like hayhouseradio.com, but now when a pop up player comes up and I push play nothing happens. I had the program little snitch on my computer and tried taking it off, but I have a feeling I

  • Extracting information about image compression settings

    Hi, Is there any way using SDK 7.0.5 to determine what image compression settings were used for color, grayscale, and monochrome images for a given pdf file? Also, is it possible to determine which color management policy was used? Thanks, Daniel She

  • IFS-34611: Error reserving version series

    Hi, When I tried the Building Versioning Application demo provided by the technet.oracle.com, I got the following error: IFS-34611: Error reserving version series All I have done is to version a doc1.txt file, then try the check-in/check-out function

  • Remapping keys broken

    I want to remap the control key to the caps lock on my PB. To do this, I used System Preferences -> Hardware -> Keyboard and Mouse -> Modifier Keys to make both caps lock and control keys perform the control action. The result is unreliable. Usually