Variables reset and memory management

    Hi,
        I'm writing an application that works on sophisticated
    data-structures, and though rely a lot on memory allocations.
    As I wanted to do a clean job as much as possible, I divided
    the work in different modules, and I'm encountering a problem
    while working with two of them.
        I wrote a data library that brings data structures needed
    by the software to work, and the last one I did was a XML wrapper
    for the CVIXML library.
        Sadly, while testing those two libraries to debug and validate
    them, I encountered a 'strange' bug in the reading functions. As
    concrete example is worth any explaination, here it is :
        First of all, I wrote several little functions like this one
    to earn some local declarations and copy/paste in my code.
    (there's xmlget_elt_val(), xmlget_attr_tag() and xmlget_attr_val())
[cf : xmlget_elt_tag() function below]
        I use them a lot through my code, but at one point, in that
    function (not even the first time I'm calling it...), I got quite
    an illogical behaviour.
Bernard Pratz
IT Developer
Engineering service
Chelton Telecom & Microwave

        Even deciding to work through using the workaround, I got into
    a similar trouble just a function latter, but at another call. For
    the context, I'm calling the xmlextract_Banc() function several times
    in the code, to get different amount of data.
        So, in the following function (called from xmlextract_Banc()) I
    discovered that I had one attribute never read. Once more, using the
    debugger, I found out that this time the xmlget_attr_val() function
    is resetting the imax variable at the second iteration of the for loop.
[cf: xmlextract_Appareil() below]
        Then I understood that any workaround I could do would only bring that
    problem at another point further in the code, and will not be resolved. I'm
    thinking this maybe some kind of overflow of something, somewhere... But I
    can't tell what and where (...if I'm right).
        I'm using the 'data' library, which defines the structs and all the
    functions such as create_Type() or push_Type() I use in those snippets, with
    the GUI, and the measurement library without any trouble, but that doesn't
    mean it's not guilty...
        I'm really clueless about this problem, at the point I'm trying to find
    out other ways around to get a xml library to work with the application. I'm
    trying out right now to get a 'libxml++' dll to be wrapped and included in the
    project, instead of using genuine's labWindows/CVI XML interface. But as I wrote
    almost 85-90% of the library before getting into that trouble, it'd be really
    more than helpful if someone could help me find out what's wrong.
    Thanks for reading this post,
    I can give more informations about the project if needed
    and thanks again for any answer I could get.
PS: I had to split the message in order to get into the 5000 chars limit per post
    I know there may be a reason for that limit to exists, but I prefered to ignore
    it and make my problem's explaination much verbose
Bernard Pratz
IT Developer
Engineering service
Chelton Telecom & Microwave

Similar Messages

  • E 72 - hard reset and memory card

    Hi,
    I am having some problems with the E 72 which seem like a virus, and i wanted to know what the options for reformatting are. Should i do a return to factory setting, or a hard reset?
    Second, how do i make sure that the memory card is virus free as well? If i format it, how would i recover any pre-installed software that came with the phone?
    Thanks

    If you are worried only about the preinstalled SW that came with the phone, then they will remain after the hard reset. You will loose your data, configuration and all installed apps.
    Was this post helpful? If so, please click on the white "Kudos!" star to the left. Thank you!

  • How to save large amount of data and memory management

    hi guys,
    I prepared a vi to take measurement of temperature and pressure simultaneously from Agilent 34970A with 34901A. The sampling rate is 1 sample/per second for each channel (20 temperature channel and 2 pressure channel (current). The device has 20 channels and most probably the test will lasts 2 days. So, it means 86400 sample per day totally. Could the attached vi  do this task? I really do not know how the "write to text file.vi" works and use the memory of the pc. And after collecting all data, could I export these data to microsoft office excel to analyse safely? And I really do not know can I work this vi without interrupting. is it possible? I am also open for all other suggests relevant the vi, too. And I wonder that is it possible to build a standalone application to take measurements from DAQ devices (here Agilent 34970A-34901A)  by a pc without labview?
    Egemen
    Attachments:
    Agilent_Labview_v2.4.vi ‏85 KB

    Hey,
    What I meant by check for an error while measuring is the following:
    you start the program
    If one of your Agilent VIs returns an error (maybe bad initialisation or so) you will still try to continue to measure.
    Even if it is not working, you still continue measuring. Instead you could also check at the end of each loop if an error occured, like this:
    this will only look for an error and stop right away. If you encounter typical errors with apperatus you might want to handle it. A sufficient way to do so might be a state machine that just re-initializes the setup if an error occurs and then continues with its task. Check out this article: http://www.ni.com/white-paper/3024/en
    Anyway, I would recommend to just try it out and see what problems arise, as you might spend hours of improving well working code (:

  • DBMS_LOB and memory management

    Hello all,
    When I declare a CLOB variable (myclob) do I always have to free it with dbms_lob.freetemporary(myclob) at the end of my procedure ?
    I know I have to free it if it was created with dbms.createtemporary(myclob,....) but what happens when I run statements like "SELECT to_clob('Test') INTO myCLOB FROM DUAL;"
    I don't find in Oracle documentation a good answer to this question ! Can someone explain the difference ? I hope memory is freed correctly without having to explicitly do a "freetemporary" but I'm not sure !
    Thanks for your answers !

    Thanks
    But imagine you have something like
    DECLARE
       myCLOB CLOB
    BEGIN
       myCLOB := to_clob('test clob');
       -- Is it necessary ???
       --  dbms_lob.freetemporary(myCLOB,...) ;
    END;1) Do I have to explicitely free "myCLOB" or is it automatically done by Oracle ?
    2) Does the declaration of myCLOB involves the creation of a "new temporary LOB" or is it only when we create the lob explicitly with the dbms_lob.createtemporary(...);
    Regards

  • OpenGL Photoshop CS5 and memory management by OSX 10.6

    I was able to find out quite a bit about the secrets around this issue - see my post on "NVIDIA Geforce 9400M and Adobe Photoshop/CS5 question".
    What I still do not understand is the following Apple-remark (in this case on the 17" PowerBook)
    NVIDIA GeForce GT 330M graphics processor with 512MB of GDDR3 memory
    Intel HD Graphics with 256MB of DDR3 SDRAM shared with main memory
    Memory available to Mac OS X may vary depending on graphics needs. Minimum graphics memory usage is 256MB.
    For me as a layman it reads "You buy 512 MB and 256MB of graphic memory but if your programs will get it will be decided by OSX 10.6"
    What I am also wondering if there is a utility or a Terminal-input that allows to influence how much OpenGL gets from the regular memory DRAMs.

    Since the posting I have had no single problem with my 144MB VRAM - though it is somewhat noticeble that more VRAM would accelarate like when I use complex plugin from NIK or parallel video recording with EyeTV. What I avoid is to work with Photoshop, export downloaded TV-clips with EyeTV AND watch life Television.

  • What is difference between 32 bit and 64 bit sql server memory management

    What is difference between 32 bit and 64 bit sql server memory management
    Thanks
    Shashikala

    This is the basic difference...check if helps:
    A 32-bit CPU running 32-bit software (also known as the x86 platform) is so named because it is based on an architecture that can manipulate values that are up to 32 bits in length. This means that a 32-bit memory pointer can store a value between 0 and
    4,294,967,295 to reference a memory address. This equates to a maximum addressable space of 4GB on 32-bit platforms
    On the other hand 64-bit limit of 18,446,744,073,709,551,616, this number is so large that in memory/storage terminology it equates to 16 exabytes. You don’t come across that term very often, so to help understand the scale, here is the value converted to
    more commonly used measurements: 16 exabytes = 16,777,216 petabytes (16 million PB)➤ 17,179,869,184 terabytes (17 billion TB)➤ 17,592,186,044,416 gigabytes (17 trillion GB)➤
    As you can see, it is significantly larger than the 4GB virtual address space usable in 32-bit systems; it’s so large in fact that any hardware capable of using it all is sadly restricted to the realm of science fiction. Because of this, processor manufacturers
    decided to only implement a 44-bit address bus, which provides a virtual address space on 64-bit systems of 16TB. This was regarded as being more than enough address space for the foreseeable future and logically it’s split into an 8TB range for user mode
    and 8TB for kernel mode. Each 64-bit process running on an x64 platform will be able to address up to 8TB of VAS.
    Please click the Mark as answer button and vote as helpful if this reply solves your problem

  • Questions about db_keep_cache_size and Automatic Shared Memory Management

    Hello all,
    I'm coming upon a server that I'm needing to pin a table and some objects in, per the recommendations of an application support call.
    Looking at the database, which is a 5 node RAC cluster (11gr2), I'm looking to see how things are laid out:
    SQL> select name, value, value/1024/1024 value_MB from v$parameter
    2 where name in ('db_cache_size','db_keep_cache_size','db_recycle_cache_size','shared_pool_size','sga_max_size');
    NAME VALUE VALUE_MB
    sga_max_size 1694498816 1616
    shared_pool_size 0 0
    db_cache_size 0 0
    db_keep_cache_size 0 0
    db_recycle_cache_siz 0 0
    e
    Looking at granularity level:
    SQL> select granule_size/value from v$sga_dynamic_components, v$parameter where name = 'db_block_size' and component like 'KEEP%';
    GRANULE_SIZE/VALUE
    2048
    Then....I looked, and I thought this instance was set up with Auto Shared Mem Mgmt....but I see that sga_target size is not set:
    SQL> show parameter sga
    NAME TYPE VALUE
    lock_sga boolean FALSE
    pre_page_sga boolean FALSE
    sga_max_size big integer 1616M
    sga_target big integer 0
    So, I'm wondering first of all...would it be a good idea to switch to Automatic Shared Memory Management? If so, is this as simple as altering system set sga_target =...? Again, this is on a RAC system, is there a different way to do this than on a single instance?
    If that isn't the way to go...let me continue with the table size, etc....
    The table I need to pin is:
    SQL> select sum (blocks) from all_tables where table_name = 'MYTABLE' and owner = 'MYOWNER';
    SUM(BLOCKS)
    4858
    And block size is:
    SQL> show parameter block_size
    NAME TYPE VALUE
    db_block_size integer 8192
    So, the space I'll need in memory for pinning this is:
    4858 * 8192 /1024/1024 = 37.95.......which is well below my granularity mark of 2048
    So, would this be as easy as setting db_keep_cache_size = 2048 with an alter system call? Do I need to set db_cache_size first? What do I set that to?
    Thanks in advance for any suggestions and links to info on this.
    cayenne
    Edited by: cayenne on Mar 27, 2013 10:14 AM
    Edited by: cayenne on Mar 27, 2013 10:15 AM

    JohnWatson wrote:
    This is what you need,alter system set db_keep_cache_size=40M;I do not understand the arithmetic you do here,select granule_size/value from v$sga_dynamic_components, v$parameter where name = 'db_block_size' and component like 'KEEP%';it shows you the number of buffers per granule, which I would not think has any meaning.I'd been looking at some different sites studying this, and what I got from that, was that this granularity gave you the minimum you could set the db_keep_cache_size, that if you tried setting it below this value, it would be bumped up to it, and also, that each bump you gave the keep_cache, would be in increments of the granularity number....?
    Thanks,
    cayenne

  • Apple Ipad has been factory reset and removed from manage devices but the new user can't register it under a new ID

    iPad generation 2 has been factory reset, removed from managed devices, apple support, and the device still continues to say it's locked by my ID and cannot be unlocked and registered to a new ID.
    HELP!

    Even if you are sure you have done all of this, do it again slowly and in the order given:
    Prepare your device to sell or give away
    If there is still a problem, post back with the exact complete wording of the error message
    received.

  • A few questions and some things we found about Memory Management

    We have been development a pretty complex RIA in flash; true
    we probably should have used flex but we are very heavily invested
    in flash and moving to flex was not really an option due to time
    constraints and the learning curve associated with changing. That
    reminds me are the Flex UI Objects going to be made available for
    Flash CS3 I mean that advanced datagrid would be nice?
    The application is a order processing and document
    management system that has around 150 swf’s and I am posting
    here to let people know what we found through our development and
    testing cycles and also have a few questions that I am hoping
    someone will at least point me in the right direction.
    We were kind of disappointed to find that you could no
    longer duplicate Movies and were forced to reload them if we wanted
    different instances, but we got over that fast. Keeping this in
    mind we decided to make as many dynamic screens as we could but
    these turned out to be horribly time consuming. I mean sure we
    could make the fields jump around like fleas on a dogs back (and it
    was a great joke) but not very practical. So back to the IDE and
    fla creation we went. This leads me to my first question has anyone
    see heard of or thought about a SWF file reader that would read the
    layout of a SWF and then generate the actionscript as output?
    As we were developing we found that it was more complex, and
    I think unnecessarily so, to get connected to a database. We use
    ColdFusion as our “middleware” so it wasn’t to
    bad and this leads me to my next question. Is there or has there
    been any indication that Flex data services or well I guess BlazeDS
    now is available for Flash CS3?
    So we went on our merry little way and everything was going
    great until testing this is when we started to see what kind of
    memory flash really eats up. In the beginning our app would take up
    a gig through the course of a day.
    Any Class that we created we added a CleanUp method to it.
    Yes we used weak listeners, yes we destroyed, and all references to
    the main movies, and yes that was it the main movies.
    Don’t be fooled the same way we were. The Garbage
    collection simulation
    http://www.adobe.com/devnet/flashplayer/articles/garbage_collection.html
    does not really tell you the whole story. Even though if you cut
    the line from the root the simulation suggests that the rest of the
    objects that you have created within that object will be marked and
    collected. Not so.
    After much testing we found that if we wanted a full recovery
    of memory the object and it’s sub objects and sub sub ojects
    within arrays also with sub objects must be deallocated and then
    assinged null to get full collection, I say full but really mean
    between 90-95% reminds me of my C programming days.

    We have been development a pretty complex RIA in flash; true
    we probably should have used flex but we are very heavily invested
    in flash and moving to flex was not really an option due to time
    constraints and the learning curve associated with changing. That
    reminds me are the Flex UI Objects going to be made available for
    Flash CS3 I mean that advanced datagrid would be nice?
    The application is a order processing and document
    management system that has around 150 swf’s and I am posting
    here to let people know what we found through our development and
    testing cycles and also have a few questions that I am hoping
    someone will at least point me in the right direction.
    We were kind of disappointed to find that you could no
    longer duplicate Movies and were forced to reload them if we wanted
    different instances, but we got over that fast. Keeping this in
    mind we decided to make as many dynamic screens as we could but
    these turned out to be horribly time consuming. I mean sure we
    could make the fields jump around like fleas on a dogs back (and it
    was a great joke) but not very practical. So back to the IDE and
    fla creation we went. This leads me to my first question has anyone
    see heard of or thought about a SWF file reader that would read the
    layout of a SWF and then generate the actionscript as output?
    As we were developing we found that it was more complex, and
    I think unnecessarily so, to get connected to a database. We use
    ColdFusion as our “middleware” so it wasn’t to
    bad and this leads me to my next question. Is there or has there
    been any indication that Flex data services or well I guess BlazeDS
    now is available for Flash CS3?
    So we went on our merry little way and everything was going
    great until testing this is when we started to see what kind of
    memory flash really eats up. In the beginning our app would take up
    a gig through the course of a day.
    Any Class that we created we added a CleanUp method to it.
    Yes we used weak listeners, yes we destroyed, and all references to
    the main movies, and yes that was it the main movies.
    Don’t be fooled the same way we were. The Garbage
    collection simulation
    http://www.adobe.com/devnet/flashplayer/articles/garbage_collection.html
    does not really tell you the whole story. Even though if you cut
    the line from the root the simulation suggests that the rest of the
    objects that you have created within that object will be marked and
    collected. Not so.
    After much testing we found that if we wanted a full recovery
    of memory the object and it’s sub objects and sub sub ojects
    within arrays also with sub objects must be deallocated and then
    assinged null to get full collection, I say full but really mean
    between 90-95% reminds me of my C programming days.

  • After a one week logout and shutdown my macpro 1,1 laptop shows a black screen at startup attempts. The battery is fully charged and both resetting the power manager  and zapping the PRAM have failed to permit startup. What else can I try?

    After a one week logout and shutdown my macpro 1,1 laptop running OSx 10.6.8 shows a black screen at startup attempts. The battery is fully charged and both resetting the power manager  and zapping the PRAM have failed to permit startup. What else can I try?

    Startup – Black screen with cursor
    Startup Issues - Resolve
    Startup Issues - Resolve (2)

  • Difference between nio-file-manager  and nio-memory-manager

    Hi,
    what's the difference between nio-file-manager and nio-memory-manager? The documentation doesn't really discuss the differences as far as I know. They both use nio to store memory-mapped files don't they? What are the advantages/disadvantages of both?
    When to choose the first one and when the second when storing a large amount of data? Can both be used to query data with the Filter API? Are there size limits on both?
    Best regards
    Jan

    Hi Jan,
    The difference is that one uses a memory mapped file and one uses direct nio memory (as part of the memory allocated by the JVM process) to store the data. Both allow storing cache data off heap making it possible to store more data with a single cache node (JVM) without long GC pauses.
    If you are using a 32 bit JVM, the JVM process will be limited to a total of ~3GB on Windows and 4GB on Linux/Solaris. This includes heap and off heap memory allocation.
    Regarding the size limitations for the nio-file manager Please see the following doc for more information.
    With the release of 3.5 there is now the idea of a Partitioned backing map which helps create larger (up to 8GB of capacity) for nio storage. Please refer to the following doc.
    Both can be used to query data but it should be noted that the indexes will be stored in heap.
    hth,
    -Dave

  • HT3964 Hi my MacBook is freezing whenever I try to open an application. I have tried resetting the system management controller, however no success. How can I wipe my hardrive and reinstall it again. PS: I no longer have the installation CDs,

    Hi my MacBook is freezing whenever I try to open an application. I have tried resetting the system management controller, however no success. How can I wipe my hardrive and reinstall it again. PS: I no longer have the installation CDs, can I download it from Apple?

    To get replacement installation disks, call Apple.  Have the serial number of your MBP ready and a credit card.  There is a fee.
    Ciao.

  • Memory Management with NSString and synthesized properties

    I thought I understood memory management but now I'm getting some odd behavior and that's the only thing I can see that I might be doing incorrectly:
    I have a synthesized NSString propery called displayText. At one point I attempt to set a label with the displayText property (label.text = [[note displayText]]). The first one works, but the second one does not:
    [note setDisplayText:[[note fileName]]]; // - works
    [note setDisplayText:[[self getCharacterInFileName:[[note fileName]]]]; // - does not work
    And here is getCharacterInFileName:
    // Given the fileName for the image, get the specific part of that fileName for the note letter
    - (NSString *)getCharacterInFileName:(NSString *)fileName
    NSRange range = {1,1};
    NSString *characterInString = [[[NSString alloc]] initWithString:[[fileName substringWithRange:range]]];
    return characterInString;
    Is there some pointer mismanagement going on here that I'm missing?
    Message was edited by: darkpegasus

    Nevermind, I'm an idiot. I forgot to close an if/else block with a brace and it screwed everything up.

  • Memory management in jelly bean xperia tablet s and performance issues

    Most used apps are always in memory.
    while recent apps few remain in memory untill memory is full.
    this is how memory management is supose to work.
    pretty much same as windows 7
    but if this true then why are games lagging ?
    http://www.youtube.com/watch?v=S3TwBlW5ibk
    When their not enough memory games i suspect lagging.
    if their not enough memory recent apps getting killed to free up ram.
     why does't this happen ?
    And why are their apps in memory that i never use ?
    tv sideview never use why its in memory ?
    social life again never use again using memory
    reader widget again using ram again never use at all
    music unlimited again in memory never actualy use
    Like i say'd most used apps are in memory all the time while rest is in cache.
    But my most used apps are never in ram untill i start them
    now if disabled lot apps my tablet become much faster respondsive.
    Can sony plz plz plz plz fix memory management stop saying you did ?
    You maybe reduced random shutdowns by like 90% or 95% perhaps even 99.99%
    Before random shutdowns happend because of broken memory management, which obviously still broken as i see lag in games
    sony apps use way to much ram, stop treating it like a computer with infinity amount of ram

    I rooted my tablet, and when looking at the processor speed in SetCPU, Sony uses a governor for power management that makes the tablet run jagged... I changed the power governor to ondemand, and got MUCH better smoothness and performance, while not sacrificing my battery life. You should try it out, maybe that'll help with games and such.

  • Memory Management comparison between Database 9208 and 11gR2 on Sun Solaris

    Hi All,
    Need some case studies which would help understand how Memory management is done in 9208 and 11gR2 on Sun Solaris SPARC
    Also wanted some real time data which says 11gR2 manages Memory and CPU better than 9208. Some comparison Graph between 9i and 11gR2.
    Any information will be of great help.
    Thanks everyone for your support.
    Thanks
    Abdul

    please see if below helps :
    http://www.oracle.com/global/de/upgradecommunity/artikel/upgrade11gr1_workshop2.pdf
    http://www.dba-oracle.com/oracle11g/oracle_11g_memory_target_parameter.htm
    Regards
    Rajesh

Maybe you are looking for

  • How do I back up Wireless Hard Drive using Time Machine

    I have a MacBook Pro and I'm running OSX Lion. I'm having trouble setting up time machine to back up two USB external hard drives (named Portable iTunes and Portable iPhoto) connected to my Airport Extreme Base Station. I have a time capsule with a 3

  • PDF files turns white after exporting from InDesign CS5

    Hi all When I export PDF files fom inDesign CS5 they turn out all white when I open them in Acrobat Reader (I´ve tried both in version 9 and the latest version). When I first open the PDF it seems to be ok but as soon as I zoom out it turns white. An

  • How to make a slide-out pane?

    Hi forum, who can help me again? ;) This is an example: http://docs.oracle.com/javafx/1.3/howto/Slideout-Panel-Tutorial.html Edited by: 899956 on 2-dic-2011 6.53 Edited by: 899956 on 2-dic-2011 6.54

  • Animation in Photoshop

    Hi, I have made my first animation in photoshop using rotoscoping technique, drawing on top of a quicktime video. I have made a new layer for every frame, and set the limit to every 2 frames. Everything was fine and I was about to export the animatio

  • How to use Restricted or Calculated Key figure with Characteristics?

    Hi, Query has characteristics 'Indicator' which has values  'X' and 'Y' depending this value, the Key figure Quantity(which is always +ve) has to be shown on the report either as -ve or +ve. Do I use Restricted Key figure if so, how? Or can I manage