DeAllocation of memory

I have a C++ program which uses a vector of certain object. In one particular scenario, the number of objects pushed to the vector becomes so high that the memory usage goes above 1GB . But when the vector gets destroyed (as it comes out of the scope of the function which creates it) I expect the memory to be freed and same to be reflected in the usage report (I use the tools prstat, pmap, top etc to check the memory). But this doesn't seem to happen. My doubts are,
1. Is the memory actually got freed?
2. Is it due memory management expecting similar requests again from the process and then allocate from this chunk of memory?
3. Will this memory be usable by other processes in case they make dynamic allocation requests?
4. How can I see the actual memory usage at any point of time by the process (This is very much required as I am investigating a possible memory leak issue)
The same scenario I tried in Redhat Linux, but the freeing of memory gets reflected in the report.
Edited by: Rejikumar on Jan 11, 2008 10:18 PM

Yes, Java has garbage collection. You don't have to deliberately deallocate memory.
Just be sure that you don't keep any references to unused items floating around. This is typically hard to do by accident. You'd have to deliberately store a reference in a data structure of some sort.

Similar Messages

  • Regarding memory allocation & deallocation of memory during portal access.

    Dear  Experts,
    Please help me with the below simple query.
    I am working on webydnpro abap for develpment. Lets suppose, If i have 2 links/applications in sap portal , both are individual sap webdynpro components. If i click 1st link/application in portal, then it will call the url of web dynpro abap component. If i click 2nd link immediately after 1st link, then it navigates and opens the 2nd application. But the memory is still open for 1st application as well as 2nd application. So the load is getting increased though the user may acess the application or not .
    So could anyone suggest on what should be done, for terminating the memory allocation of 1st application while accessing 2nd application and vice versa.
    Regards,
    Murali.

    I can't offer much in the way of details, but you might want to investigate USBTMC (USB Test and Measurement Class). With a driver written to this spec, you use VISA commands to the USB instrument in exactly the same manner as a GPIB device (i.e. VISA Write "*IDN?", VISA Read "response"). Drivers that implement this are much easier to use than exposing USB Raw. This will take more work on your end but will end up with greater customer satisfaction. This is the route we're taking with some instruments developed for internal use. They may never be commercially released but the current customer (me), is very happy. The developer started by googling USBTMC and went on from there.

  • Dynamic Memory

    Hello,
    I was reading up the field symbols(FS) and data references(DR) in the ABAP help documents and i have a doubt.
    When you can use data references to allocate memory dynamically how can or rather what happens to this memory when you have done both of the following
    1) Used the CLEAR statement on the DR &
    2) Used the UNASSIGN statement on the FS into which the
       DR was de referenced.
    I understand the DR will stop pointing to anything but then what really happens to the memory it was pointing to. Questions
    1) Is it deallocated ?
    2) Is it left dangling i.e. will it remain there until
       the program is ended ?
    I am looking at deallocating this memory completely. Is this possible?

    Hi Gerson,
    To answer your question, garbage collector will run to clean up dangling references to DATA as well.
    I would like to add something more in this context -
    It is natural to associate garbage collection with Objects, since that is what we see in other languages (Java, for example).
    In ABAP, if you have noticed, we can have references to data as well as objects. Look at the following variant of the DATA statement -
    DATA OREF TYPE REF TO OBJECT.
    The above statement can be used to create an object whose type (i.e., a class) is not known until runtime.
    So, any dangling reference will be considered by the garbage collector, whether it is to DATA or OBJECT.
    Further, if the memory is reclaimed after the program execution, it is no longer termed as <i>garbage collection</i>. The idea is to make a program run in as little memory as required.
    Regards,
    Anand Mandalika.

  • Labview memory

    Hi all ,
    I am using following VI to convert binary file into a CSV file with a specific formatting. 
    I am facing problems in deallocation of memory using this VI. I check the PF usage under performance tab of windows task manager before and after the VI runs. It takes up about 0.23 GB of memory even after I have shut the VI. Consecutive runs of the same VI result in 0.23 GB or less being added up again and again.
    Is there a way to allocate memory and recover all of it back when the VI shuts down?
    Thanks
    Vivan 
    Vivan Sachdeva
    Lasers for Science Facility
    Rutherford Appleton Laboratory
    STFC
    Oxford
    United Kingdom
    Attachments:
    test_4.vi ‏21 KB
    test_4.vi ‏21 KB

    Hi 
    Thank you all for ur help
    Sorry about not posting the other covert array VI earlier.
    The binary file is about 40 MB, this one is just a test file and could be bigger in future reaching upto 1 GB.
    About 'after i have shut the VI', i check the pf usage under performance tab in the windows task manager. its is about 850mb before i run the vi for the first time. it builds upto 1.15GB during the run. I assumed that the deallocation memory vi would return me all the memory and bring back the pf usage to 850mb but it only returns 0.15GB. so the pf usage is 1gb after vi run. it remains around 1GB after each successive run. 
    is there a way to recover this 150 mb as well after each VI run?
    Deallocation Memory VI - i tried putting using it in several ways. I made the sequences into subVIs and had the DelMem VI in each on of them. that didn't help either. i read some where that using a lot of DelMem VI could cause labVIEW to use more memory than required, so i just put one in last sequence box of the main vi.
    I could try using local variable and post the results.
    Thank 
    Vivan
    Vivan Sachdeva
    Lasers for Science Facility
    Rutherford Appleton Laboratory
    STFC
    Oxford
    United Kingdom
    Attachments:
    convert aray test.vi ‏17 KB

  • How can I use one motion controller to control two robotic independently?

    the help document says :
    Note  Configuring and clearing buffers is a processor-intensive operation on the motion controller that requires the allocation and deallocation of memory. You should configure and clear buffers only when motors are not moving and onboard programs are not running. For example, if you wish to execute three simultaneous contouring operations on axis 1, axis 2, and vector space 1 (with axes 3 and 4), you should first configure all three buffers before starting any of the operations. You can start the contour operations independently, and at different times, but should wait until all operations are complete before clearing any of the buffers.
    and i tried to conduct two contouring operation on two vector space. and tried to clear or configuring buffer for one vector when another one is still moving. so that i can start or end the movement at any time i want,and  it is ok.no error. but when i tried add a buffer  breakpoint output along with each vector movement. the bp doesn't work if the other vector is running . is there anyway to solve this problem.

    I think you've misunderstood what the dns attribute is for. The dns attribute returns the hostname of the client accessing your website, not the hostname of the website that linked to your website.
    For example, when someone using the Comcast ISP goes to a malicious website at example.com that loads images from your website at www.amigoo.net, the dns attribute will be something like "c-1-2-3-4.ca.comcast.net", not "example.com". ACLs are used for authentication and authorization of clients (not the websites those clients chose to visit), and they don't provide the functionality you're looking for.
    If I understand correctly, you want to prevent websites other than amigoo.net from linking to files in your d:/webserver/imat/pics_upload directory. You can achieve this adding the following lines to your obj.conf configuration file:
    <Object ppath="d:/webserver/imat/pics_upload/*">
    <Client referer="*~*amigoo.net">
    PathCheck fn="deny-existence"
    </Client>
    </Object>

  • Timed loop and CPU usage

    Platform is WIN_XP Pro and machine is a P4 at 2.5Ghz with 512 Mb ram.
    LV7.1 + PCI 6229
    I am using  50ms Timed loop for running a state machine inside it
    and also a  whole lot of other things like reading / writing
    DAQMx  functions;  file I/O functions and such. As the
    project involves a  main and sub-panlel set up local variables
    could not be elimnated fully and there should be something like 150 of
    them. But not all are accessed always - maybe about 15 of them at any
    given time depending on the SM staus.
    Problem :
    Once started the "Finished late"  indication  is off and
    the  actual timing  alternates between 49 to 52 ms. The CPU
    usage is around 25%.
    But as time goes by,  the system gets unstable : After 15 minutes
    or so, the Finished Late indication is always ON and the CPU usage is
    gradually tending towards or exceeds 100%. 
    Obviously the machine control timing now gets affected and things slow
    down badly. Closing the application ands restarting repeats the above
    cycle.
    I am at a loss  to understand what is happening ?  WIll
    breaking down the single Timed Loop to multiple ones help  ? WIll
    that be an efficient way of parallel threading ?
    I can post the code but its quite large and will do it as a last resort.
    thanks
    Raghunathan
    Raghunathan
    LV2012 to Automate Hydraulic Test rigs.

    Hello,
    It sounds like an interesting problem.  It would be worth some experimentation to figure out what's going wrong - attempting to decouple major "pieces" of the code would be helpful.  For example, you could try breaking your code into multiple loops if that makes sense in your architecture, but perhaps you could even eliminate all but one of the loops to begin with, and see if you can correlate the problem to the code in just one of your loops.
    Another concern is that you mention using many local variables.  Variable read operations cause new buffer allocations, so if you're passing arrays around that way, you could be hitting a problem of forcing your machine to perform many allocations and deallocations of memory.  As arrays grow, this can be a bigger and bigger problem.  You can use other techniques for passing data around your block diagram, such as dataflow if possible (just simple wires), or queues where dataflow can't dicatate program flow completely.
    Hopefully looking into your code with the above considerations will lead you in the right direction.  In your case, removing code so that you can identify which elements are causing the problem should help significantly.
    Best Regards,
    JLS
    Best,
    JLS
    Sixclear

  • How to create 2 ALV output lists in a single output?

    Hi guys...
    My clients requirement is to create 2 ALV output lists in a single output list.how can i do this?i mean which function module i can use for this requirement?please help me out...
    Regards..

    *& Report  ZLCL_ALV_INT_INVOICE                                        *
    REPORT  ZLCL_ALV_INT_INVOICE                    .
    DATA: O_CONT1 TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
          O_CONT2 TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
          O_GRID1 TYPE REF TO CL_GUI_ALV_GRID,
          O_GRID2 TYPE REF TO CL_GUI_ALV_GRID.
    DATA: IT_VBRK LIKE VBRK OCCURS 1 WITH HEADER LINE.
    DATA: IT_VBRP LIKE VBRP OCCURS 1 WITH HEADER LINE.
    DATA: WA_VBRK LIKE VBRK.
    *--Layout
    DATA: WA_LAYO TYPE LVC_S_LAYO.
          CLASS LCL_BILLING DEFINITION
    CLASS LCL_BILLING DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS: HANDLE_HOTSPOT_CLICK
                 FOR EVENT HOTSPOT_CLICK
                 OF CL_GUI_ALV_GRID
                 IMPORTING E_ROW_ID.
    ENDCLASS.                    "LCL_BILLING DEFINITION
          CLASS LCL_BILLING IMPLEMENTATION
    CLASS LCL_BILLING IMPLEMENTATION.
      METHOD HANDLE_HOTSPOT_CLICK.
        IF NOT E_ROW_ID IS INITIAL.
    *--Reading selected billing docno
          READ TABLE IT_VBRK INTO WA_VBRK INDEX E_ROW_ID-INDEX.
    *--GETTING BILLING DOC ITEMS
          REFRESH IT_VBRP.
          SELECT *
            FROM VBRP
            INTO TABLE IT_VBRP
            WHERE VBELN = WA_VBRK-VBELN.
          CALL SCREEN 200.
        ENDIF.
      ENDMETHOD.                    "HANDLE_HOTSPOT_CLICK
    ENDCLASS.                    "LCL_BILLING IMPLEMENTATION
    SELECT-OPTIONS: S_VBELN FOR IT_VBRK-VBELN.
    START-OF-SELECTION.
      PERFORM GET_DATA.
      SET SCREEN 100.
    *&      Form  GET_DATA
          text
    FORM GET_DATA .
    *--billing header data
      SELECT *
        FROM VBRK
        INTO TABLE IT_VBRK
        WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE I000(Z00) WITH 'No Data Found'.
      ENDIF.
      EXIT.
    ENDFORM.                    " GET_DATA
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'MENU'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE USER_COMMAND_0100 INPUT.
      CASE SY-UCOMM.
        WHEN 'BACK'.
          PERFORM EXIT_PROGRAM.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Module  PBO_100  OUTPUT
          text
    MODULE PBO_100 OUTPUT.
      IF O_CONT1 IS INITIAL.
        CREATE OBJECT O_CONT1
          EXPORTING
            CONTAINER_NAME              = 'VBRK_CONT'
          EXCEPTIONS
            CNTL_ERROR                  = 1
            CNTL_SYSTEM_ERROR           = 2
            CREATE_ERROR                = 3
            LIFETIME_ERROR              = 4
            LIFETIME_DYNPRO_DYNPRO_LINK = 5
            OTHERS                      = 6
        IF SY-SUBRC <> 0.
          MESSAGE I000(Z00) WITH 'Error in container'.
          EXIT.
        ENDIF.
        CREATE OBJECT O_GRID1
          EXPORTING
             I_PARENT          = O_CONT1
          EXCEPTIONS
            ERROR_CNTL_CREATE = 1
            ERROR_CNTL_INIT   = 2
            ERROR_CNTL_LINK   = 3
            ERROR_DP_CREATE   = 4
            OTHERS            = 5
        IF SY-SUBRC <> 0.
          MESSAGE I000(Z00) WITH 'Error in Grid'.
          EXIT.
        ENDIF.
      ENDIF.
    *--Layout for 1st grid
      WA_LAYO-KEYHOT = 'X'.
      WA_LAYO-GRID_TITLE = 'Billing Document Header Data'.
      CALL METHOD O_GRID1->SET_TABLE_FOR_FIRST_DISPLAY
        EXPORTING
          I_STRUCTURE_NAME              = 'VBRK'
          IS_LAYOUT                     = WA_LAYO
        CHANGING
          IT_OUTTAB                     = IT_VBRK[]
        EXCEPTIONS
          INVALID_PARAMETER_COMBINATION = 1
          PROGRAM_ERROR                 = 2
          TOO_MANY_LINES                = 3
          OTHERS                        = 4.
      IF SY-SUBRC <> 0.
        MESSAGE I000(Z00) WITH 'Error in showing grid'.
        EXIT.
      ENDIF.
    *-Setting the focus on the grid
      CALL METHOD CL_GUI_CONTROL=>SET_FOCUS
        EXPORTING
          CONTROL           = O_GRID1 "Grid control object
        EXCEPTIONS
          CNTL_ERROR        = 1
          CNTL_SYSTEM_ERROR = 2
          OTHERS            = 3.
      IF SY-SUBRC <> 0.
        MESSAGE I000(Z00) WITH 'Error in setting focus'.
      ENDIF.
    *--Event handler registration
      SET HANDLER LCL_BILLING=>HANDLE_HOTSPOT_CLICK FOR O_GRID1.
    ENDMODULE.                 " PBO_100  OUTPUT
    *&      Module  STATUS_0200  OUTPUT
          text
    MODULE STATUS_0200 OUTPUT.
      SET PF-STATUS 'MENU'.
    ENDMODULE.                 " STATUS_0200  OUTPUT
    *&      Module  USER_COMMAND_0200  INPUT
          text
    MODULE USER_COMMAND_0200 INPUT.
      CASE SY-UCOMM.
        WHEN 'BACK'.
          LEAVE TO SCREEN 100.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0200  INPUT
    *&      Module  PBO_200  OUTPUT
          text
    MODULE PBO_200 OUTPUT.
      IF O_CONT2 IS INITIAL.
        CREATE OBJECT O_CONT2
            EXPORTING
            CONTAINER_NAME              = 'VBRP_CONT'
        EXCEPTIONS
          CNTL_ERROR                  = 1
          CNTL_SYSTEM_ERROR           = 2
          CREATE_ERROR                = 3
          LIFETIME_ERROR              = 4
          LIFETIME_DYNPRO_DYNPRO_LINK = 5
          OTHERS                      = 6
        IF SY-SUBRC <> 0.
          MESSAGE I000(Z00) WITH 'Error in container'.
          EXIT.
        ENDIF.
        CREATE OBJECT O_GRID2
          EXPORTING
            I_PARENT          = O_CONT2
          EXCEPTIONS
            ERROR_CNTL_CREATE = 1
            ERROR_CNTL_INIT   = 2
            ERROR_CNTL_LINK   = 3
            ERROR_DP_CREATE   = 4
            OTHERS            = 5.
        IF SY-SUBRC <> 0.
          MESSAGE I000(Z00) WITH 'Error in grid linking'.
          EXIT.
        ENDIF.
        CALL METHOD O_GRID2->SET_TABLE_FOR_FIRST_DISPLAY
          EXPORTING
            I_STRUCTURE_NAME              = 'VBRP'
          CHANGING
            IT_OUTTAB                     = IT_VBRP[]
          EXCEPTIONS
            INVALID_PARAMETER_COMBINATION = 1
            PROGRAM_ERROR                 = 2
            TOO_MANY_LINES                = 3
            OTHERS                        = 4.
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                     WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ELSE.
    *--refreshing the alv grid with the latest content of the internal table
    *--which is linked
        CALL METHOD O_GRID2->REFRESH_TABLE_DISPLAY
          EXCEPTIONS
            FINISHED = 1
            OTHERS   = 2.
        IF SY-SUBRC <> 0.
          MESSAGE I000(Z00) WITH 'Error in Refreshing gird'.
        ENDIF.
      ENDIF.
    ENDMODULE.                 " PBO_200  OUTPUT
    *&      Form  EXIT_PROGRAM
          text
    FORM EXIT_PROGRAM .
    *--Deallocating the memory
      IF NOT O_CONT2 IS INITIAL.
        CALL METHOD O_CONT2->FREE
          EXCEPTIONS
            CNTL_ERROR        = 1
            CNTL_SYSTEM_ERROR = 2
            OTHERS            = 3.
        IF SY-SUBRC <> 0.
          MESSAGE I000(Z00) WITH 'Error in deallocating memory'.
          EXIT.
        ENDIF.
        CLEAR: IT_VBRP,
               IT_VBRP[].
        FREE:  IT_VBRP,
               IT_VBRP[].
      ENDIF.
      IF NOT O_CONT1 IS INITIAL.
        CALL METHOD O_CONT1->FREE
          EXCEPTIONS
            CNTL_ERROR        = 1
            CNTL_SYSTEM_ERROR = 2
            OTHERS            = 3.
        IF SY-SUBRC <> 0.
          MESSAGE I000(Z00) WITH 'Error in deallocating memory'.
          EXIT.
        ENDIF.
        CLEAR: IT_VBRK,
               IT_VBRK[].
        FREE:  IT_VBRK,
               IT_VBRK[].
      ENDIF.
    *--Cearing the buffered content
      CALL METHOD CL_GUI_CFW=>FLUSH
        EXCEPTIONS
          CNTL_SYSTEM_ERROR = 1
          CNTL_ERROR        = 2
          OTHERS            = 3.
      IF SY-SUBRC <> 0.
        MESSAGE I000(Z00) WITH 'Error in clearing Buffer'.
        EXIT.
      ENDIF.
      LEAVE PROGRAM.
    ENDFORM.                    " EXIT_PROGRAM
    SCREEN 100
    PROCESS BEFORE OUTPUT.
      MODULE STATUS_0100.
      MODULE PBO_100.
    PROCESS AFTER INPUT.
      MODULE USER_COMMAND_0100.
    SCREEN200
    PROCESS BEFORE OUTPUT.
      MODULE STATUS_0200.
      MODULE PBO_200.
    PROCESS AFTER INPUT.
      MODULE USER_COMMAND_0200.

  • Sample Code request

    Hi experts!!
    I 'm new to ABAP objects and i would like you, if possible, to provide me with some "real"  code using objects.
    All i find on the internet is small examples with airplanes, cars etc..
    They are easy to understand as syntax but  not realistic enough to understand the business use of objects.
    Thanx in advance!!!

    alv invoice report
    *& Report  ZLCL_ALV_INT_INVOICE                                        *
    REPORT  ZLCL_ALV_INT_INVOICE                    .
    DATA: O_CONT1 TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
          O_CONT2 TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
          O_GRID1 TYPE REF TO CL_GUI_ALV_GRID,
          O_GRID2 TYPE REF TO CL_GUI_ALV_GRID.
    DATA: IT_VBRK LIKE VBRK OCCURS 1 WITH HEADER LINE.
    DATA: IT_VBRP LIKE VBRP OCCURS 1 WITH HEADER LINE.
    DATA: WA_VBRK LIKE VBRK.
    *--Layout
    DATA: WA_LAYO TYPE LVC_S_LAYO.
          CLASS LCL_BILLING DEFINITION
    CLASS LCL_BILLING DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS: HANDLE_HOTSPOT_CLICK
                 FOR EVENT HOTSPOT_CLICK
                 OF CL_GUI_ALV_GRID
                 IMPORTING E_ROW_ID.
    ENDCLASS.                    "LCL_BILLING DEFINITION
          CLASS LCL_BILLING IMPLEMENTATION
    CLASS LCL_BILLING IMPLEMENTATION.
      METHOD HANDLE_HOTSPOT_CLICK.
        IF NOT E_ROW_ID IS INITIAL.
    *--Reading selected billing docno
          READ TABLE IT_VBRK INTO WA_VBRK INDEX E_ROW_ID-INDEX.
    *--GETTING BILLING DOC ITEMS
          REFRESH IT_VBRP.
          SELECT *
            FROM VBRP
            INTO TABLE IT_VBRP
            WHERE VBELN = WA_VBRK-VBELN.
          CALL SCREEN 200.
        ENDIF.
      ENDMETHOD.                    "HANDLE_HOTSPOT_CLICK
    ENDCLASS.                    "LCL_BILLING IMPLEMENTATION
    SELECT-OPTIONS: S_VBELN FOR IT_VBRK-VBELN.
    START-OF-SELECTION.
      PERFORM GET_DATA.
      SET SCREEN 100.
    *&      Form  GET_DATA
          text
    FORM GET_DATA .
    *--billing header data
      SELECT *
        FROM VBRK
        INTO TABLE IT_VBRK
        WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE I000(Z00) WITH 'No Data Found'.
      ENDIF.
      EXIT.
    ENDFORM.                    " GET_DATA
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'MENU'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE USER_COMMAND_0100 INPUT.
      CASE SY-UCOMM.
        WHEN 'BACK'.
          PERFORM EXIT_PROGRAM.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Module  PBO_100  OUTPUT
          text
    MODULE PBO_100 OUTPUT.
      IF O_CONT1 IS INITIAL.
        CREATE OBJECT O_CONT1
          EXPORTING
            CONTAINER_NAME              = 'VBRK_CONT'
          EXCEPTIONS
            CNTL_ERROR                  = 1
            CNTL_SYSTEM_ERROR           = 2
            CREATE_ERROR                = 3
            LIFETIME_ERROR              = 4
            LIFETIME_DYNPRO_DYNPRO_LINK = 5
            OTHERS                      = 6
        IF SY-SUBRC <> 0.
          MESSAGE I000(Z00) WITH 'Error in container'.
          EXIT.
        ENDIF.
        CREATE OBJECT O_GRID1
          EXPORTING
             I_PARENT          = O_CONT1
          EXCEPTIONS
            ERROR_CNTL_CREATE = 1
            ERROR_CNTL_INIT   = 2
            ERROR_CNTL_LINK   = 3
            ERROR_DP_CREATE   = 4
            OTHERS            = 5
        IF SY-SUBRC <> 0.
          MESSAGE I000(Z00) WITH 'Error in Grid'.
          EXIT.
        ENDIF.
      ENDIF.
    *--Layout for 1st grid
      WA_LAYO-KEYHOT = 'X'.
      WA_LAYO-GRID_TITLE = 'Billing Document Header Data'.
      CALL METHOD O_GRID1->SET_TABLE_FOR_FIRST_DISPLAY
        EXPORTING
          I_STRUCTURE_NAME              = 'VBRK'
          IS_LAYOUT                     = WA_LAYO
        CHANGING
          IT_OUTTAB                     = IT_VBRK[]
        EXCEPTIONS
          INVALID_PARAMETER_COMBINATION = 1
          PROGRAM_ERROR                 = 2
          TOO_MANY_LINES                = 3
          OTHERS                        = 4.
      IF SY-SUBRC <> 0.
        MESSAGE I000(Z00) WITH 'Error in showing grid'.
        EXIT.
      ENDIF.
    *-Setting the focus on the grid
      CALL METHOD CL_GUI_CONTROL=>SET_FOCUS
        EXPORTING
          CONTROL           = O_GRID1 "Grid control object
        EXCEPTIONS
          CNTL_ERROR        = 1
          CNTL_SYSTEM_ERROR = 2
          OTHERS            = 3.
      IF SY-SUBRC <> 0.
        MESSAGE I000(Z00) WITH 'Error in setting focus'.
      ENDIF.
    *--Event handler registration
      SET HANDLER LCL_BILLING=>HANDLE_HOTSPOT_CLICK FOR O_GRID1.
    ENDMODULE.                 " PBO_100  OUTPUT
    *&      Module  STATUS_0200  OUTPUT
          text
    MODULE STATUS_0200 OUTPUT.
      SET PF-STATUS 'MENU'.
    ENDMODULE.                 " STATUS_0200  OUTPUT
    *&      Module  USER_COMMAND_0200  INPUT
          text
    MODULE USER_COMMAND_0200 INPUT.
      CASE SY-UCOMM.
        WHEN 'BACK'.
          LEAVE TO SCREEN 100.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0200  INPUT
    *&      Module  PBO_200  OUTPUT
          text
    MODULE PBO_200 OUTPUT.
      IF O_CONT2 IS INITIAL.
        CREATE OBJECT O_CONT2
            EXPORTING
            CONTAINER_NAME              = 'VBRP_CONT'
        EXCEPTIONS
          CNTL_ERROR                  = 1
          CNTL_SYSTEM_ERROR           = 2
          CREATE_ERROR                = 3
          LIFETIME_ERROR              = 4
          LIFETIME_DYNPRO_DYNPRO_LINK = 5
          OTHERS                      = 6
        IF SY-SUBRC <> 0.
          MESSAGE I000(Z00) WITH 'Error in container'.
          EXIT.
        ENDIF.
        CREATE OBJECT O_GRID2
          EXPORTING
            I_PARENT          = O_CONT2
          EXCEPTIONS
            ERROR_CNTL_CREATE = 1
            ERROR_CNTL_INIT   = 2
            ERROR_CNTL_LINK   = 3
            ERROR_DP_CREATE   = 4
            OTHERS            = 5.
        IF SY-SUBRC <> 0.
          MESSAGE I000(Z00) WITH 'Error in grid linking'.
          EXIT.
        ENDIF.
        CALL METHOD O_GRID2->SET_TABLE_FOR_FIRST_DISPLAY
          EXPORTING
            I_STRUCTURE_NAME              = 'VBRP'
          CHANGING
            IT_OUTTAB                     = IT_VBRP[]
          EXCEPTIONS
            INVALID_PARAMETER_COMBINATION = 1
            PROGRAM_ERROR                 = 2
            TOO_MANY_LINES                = 3
            OTHERS                        = 4.
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                     WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ELSE.
    *--refreshing the alv grid with the latest content of the internal table
    *--which is linked
        CALL METHOD O_GRID2->REFRESH_TABLE_DISPLAY
          EXCEPTIONS
            FINISHED = 1
            OTHERS   = 2.
        IF SY-SUBRC <> 0.
          MESSAGE I000(Z00) WITH 'Error in Refreshing gird'.
        ENDIF.
      ENDIF.
    ENDMODULE.                 " PBO_200  OUTPUT
    *&      Form  EXIT_PROGRAM
          text
    FORM EXIT_PROGRAM .
    *--Deallocating the memory
      IF NOT O_CONT2 IS INITIAL.
        CALL METHOD O_CONT2->FREE
          EXCEPTIONS
            CNTL_ERROR        = 1
            CNTL_SYSTEM_ERROR = 2
            OTHERS            = 3.
        IF SY-SUBRC <> 0.
          MESSAGE I000(Z00) WITH 'Error in deallocating memory'.
          EXIT.
        ENDIF.
        CLEAR: IT_VBRP,
               IT_VBRP[].
        FREE:  IT_VBRP,
               IT_VBRP[].
      ENDIF.
      IF NOT O_CONT1 IS INITIAL.
        CALL METHOD O_CONT1->FREE
          EXCEPTIONS
            CNTL_ERROR        = 1
            CNTL_SYSTEM_ERROR = 2
            OTHERS            = 3.
        IF SY-SUBRC <> 0.
          MESSAGE I000(Z00) WITH 'Error in deallocating memory'.
          EXIT.
        ENDIF.
        CLEAR: IT_VBRK,
               IT_VBRK[].
        FREE:  IT_VBRK,
               IT_VBRK[].
      ENDIF.
    *--Cearing the buffered content
      CALL METHOD CL_GUI_CFW=>FLUSH
        EXCEPTIONS
          CNTL_SYSTEM_ERROR = 1
          CNTL_ERROR        = 2
          OTHERS            = 3.
      IF SY-SUBRC <> 0.
        MESSAGE I000(Z00) WITH 'Error in clearing Buffer'.
        EXIT.
      ENDIF.
      LEAVE PROGRAM.
    ENDFORM.                    " EXIT_PROGRAM
    FOR SCREEN 100
    PROCESS BEFORE OUTPUT.
      MODULE STATUS_0100.
      MODULE PBO_100.
    PROCESS AFTER INPUT.
      MODULE USER_COMMAND_0100.
    FOR SCREEN 200
    PROCESS BEFORE OUTPUT.
      MODULE STATUS_0200.
      MODULE PBO_200.
    PROCESS AFTER INPUT.
      MODULE USER_COMMAND_0200.

  • Return an array from dll to labview

    Hello,
    I am using "Call Library Function" where I call a C function from Labview.
    Now .. I want to return an 1 dimensional array from C DLL back to Labview.
    Can someone provide an example code how to do it.
    When I configure parameter, there are options "Array Data Pointer", "Array Handle" and "Array Handle Pointer".
    When I take the first (the simple one), so there is no way labview can know how many items are in the array.
    But what is the right to take?
    Thanks in advance
    Kind Regards

    You would run into the same problem calling a function that returns an array in C, because you cannot determine the number of items in an array in C solely from the pointer value that a function returns.  Also, it's a bad idea to return an array of unknown size as a function's return value, because that makes the calling function responsible for deallocating the memory even though the called function allocated it.  If you don't know in advance how large the array will be, then a better approach is to allocate an array of sufficient size in the calling function (or in LabVIEW, in this case) and pass that by reference to the function, then have the function's return value indicate the number of values in the array that are actually filled with data.

  • LabVIEW DLL 2D Array output deallocati​on

    Hey everyone,
    I am using a custom built DLL made with LabVIEW.  One of the functions outputs a 2D array of data by "handle".  I can catch the 2D array from the function just fine from within my C program, however I have a question about deallocating the memory allocated by the LabVIEW DLL for the 2D array.
    I call the DLL function repeatedly in a loop and as this occurs the RAM used on my machine continues to increase until it is full or I exit the program.  There are no other dynamically allocated peices of data within the C program that could be causing this.
    The question is, can I call free() on the 2D array handle safely?  Is this the correct way to deallocate the 2D arrays passed out of LabVIEW DLL functions?  One dimension of the 2D array is always the same size, but the other dimension varies per call.
    Here is an example (I have renamed function calls and library headers due to security reasons):
    #include "DLLHeader.h"
    int main(void)
        ResponseArrayHdl myArray = NULL;
        DLL_FUNC_InitializeLibrary();
        DLL_FUNC_ConfigurePortWithDefaults("COM3");
        DLL_FUNC_StartAutoSend(9999999);
        while(DLL_FUNC_IsTransmitting())
            DLL_FUNC_GetAllAvailableResponseMessagesByHndl(&my​Array);      // gets the 2D array
            // do something with array data here!
            free(myArray);   // is this the appropriate way to clean up the array?
            Delay(0.05);
        DLL_FUNC_GetAllAvailableResponseMessagesByHndl(&my​Array);      // gets the 2D array
        // do something with array data here!
        free(myArray);   // is this the appropriate way to clean up the array?
        DLL_FUNC_ShutdownLibrary();
        return 0;
    from DLLHeader.h:
    typedef struct {
        } ResponseMessage;      // created by the LabVIEW DLL build process
    typedef struct {
        long dimSize;
        ResponseMessage Responses[1];
        } ResponseArray;
    typedef ResponseArray **ResponseArrayHdl;   // created by the LabVIEW DLL build process
    I want to make sure this is an appropriate technique to deallocate that memory, and if not, what is the appropriate way?  I am using LabVIEW 7.1 if that matters.  The C program is just ANSI C and can be compiled with any ANSI C compliant compiler.
    Thanks!
    ~ Jeramy
    CLA, CCVID, Certified Instructor

    Tunde A wrote:
    A relevant function that will be applicable in this case (to free the memory) is the "AZDisposeHandle or DSDisposeHandle". For more information on this function and other memory management functions, checkout the " Using External Code in LabVIEW" reference manual, chapter 6 (Function Description), Memory Management Functions.
    Tunde
    One specific extra info. All variable sized LabVIEW data that can be accessed by the diagram or are passed as native DLL function parameters use always DS handles, except the paths which are stored as AZ handles (But for paths you should use the specific FDisposePath function instead).
    So in your case you would call DSDisposeHandle on the handle returned by the DLL. But if the array itself is of variable sized contents (strings, arrays, paths) you will have to first go through the entire array and dispose its internal handles before disposing the main array too.
    Rolf Kalbermatter
    Message Edited by rolfk on 01-10-2007 10:43 PM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • OLE Integration with Excel --- Urgent

    Hello,
    i want to draw two charts on Excel sheet based on some data in SAP. in the excel sheet first i have to display the data and then draw the chart for that. now i am able to draw first chart but not able to draw the second chart because i think the area where i have drawn my first chart is active and not able to print the data related to second chart. can any one tell me, how to activate the sheet after drawing first graph.
    Thanks a lot in advance...
    Mohan

    Mohan,
    Try this....
    You can activate using ...CALL METHOD OF gs_activesheet 'Activate' .
    Report ZTEST.
    INCLUDE ole2incl .
    DATA: gs_excel TYPE ole2_object ,
    gs_wbooklist TYPE ole2_object ,
    gs_application TYPE ole2_object ,
    gs_wbook TYPE ole2_object ,
    gs_activesheet TYPE ole2_object ,
    gs_sheets TYPE ole2_object ,
    gs_newsheet TYPE ole2_object ,
    gs_cell1 TYPE ole2_object ,
    gs_cell2 TYPE ole2_object ,
    gs_cells TYPE ole2_object ,
    gs_range TYPE ole2_object ,
    gs_font TYPE ole2_object ,
    gs_interior TYPE ole2_object ,
    gs_columns TYPE ole2_object ,
    gs_charts TYPE ole2_object ,
    gs_chart TYPE ole2_object ,
    gs_charttitle TYPE ole2_object ,
    gs_charttitlechar TYPE ole2_object ,
    gs_chartobjects TYPE ole2_object .
    DATA gv_sheet_name(20) TYPE c .
    DATA gv_outer_index LIKE sy-index .
    DATA gv_intex(2) TYPE c .
    DATA gv_line_cntr TYPE i . "line counter
    DATA gv_linno TYPE i . "line number
    DATA gv_colno TYPE i . "column number
    DATA gv_value TYPE i . "data
    PARAMETERS: p_sheets TYPE i .
    *Step 2 Initiate the do-loop and OLE automation base objects.
    *Code Part C.2 Looping and initializing, adding new worksheets
    START-OF-SELECTION .
    DO p_sheets TIMES .
    *--Forming sheet name
    gv_intex = sy-index .
    gv_outer_index = sy-index .
    CONCATENATE 'Excel Sheet #' gv_intex INTO gv_sheet_name .
    *--For the first loop, Excel is initiated and one new sheet is added
    IF sy-index = 1 .
    CREATE OBJECT gs_excel 'EXCEL.APPLICATION' .
    SET PROPERTY OF gs_excel 'Visible' = 1 .
    GET PROPERTY OF gs_excel 'Workbooks' = gs_wbooklist .
    GET PROPERTY OF gs_wbooklist 'Application' = gs_application .
    SET PROPERTY OF gs_application 'SheetsInNewWorkbook' = 1 .
    CALL METHOD OF gs_wbooklist 'Add' = gs_wbook .
    GET PROPERTY OF gs_application 'ActiveSheet' = gs_activesheet .
    SET PROPERTY OF gs_activesheet 'Name' = gv_sheet_name .
    *--For the rest of loops, other sheets are added
    ELSE .
    GET PROPERTY OF gs_wbook 'Sheets' = gs_sheets .
    CALL METHOD OF gs_sheets 'Add' = gs_newsheet .
    SET PROPERTY OF gs_newsheet 'Name' = gv_sheet_name .
    ENDIF .
    gv_line_cntr = 1 . "line counter
    *Step3 Write the title and format it.
    *--Title
    *--Selecting cell area to be merged.
    CALL METHOD OF gs_excel 'Cells' = gs_cell1
    EXPORTING
    #1 = 1
    #2 = 1.
    CALL METHOD OF gs_excel 'Cells' = gs_cell2
    EXPORTING
    #1 = 1
    #2 = 4.
    CALL METHOD OF gs_excel 'Range' = gs_cells
    EXPORTING
    #1 = gs_cell1
    #2 = gs_cell2.
    CALL METHOD OF gs_cells 'Select' .
    *--Merging
    CALL METHOD OF gs_cells 'Merge' .
    *--Setting title data
    CALL METHOD OF gs_excel 'Cells' = gs_cell1
    EXPORTING
    #1 = gv_line_cntr
    #2 = 1.
    SET PROPERTY OF gs_cell1 'Value' = 'TITLE' .
    *Code Part C.3 Writing and formatting the title
    *--Formatting the title
    GET PROPERTY OF gs_cell1 'Font' = gs_font .
    SET PROPERTY OF gs_font 'Underline' = 2 .
    SET PROPERTY OF gs_font 'Bold' = 1 .
    SET PROPERTY OF gs_cell1 'HorizontalAlignment' = -4108 .
    GET PROPERTY OF gs_cell1 'Interior' = gs_interior .
    SET PROPERTY OF gs_interior 'ColorIndex' = 15 .
    SET PROPERTY OF gs_interior 'Pattern' = -4124 .
    SET PROPERTY OF gs_interior 'PatternColorIndex' = -4105 .
    *Step 4 Write some additional data for the title area and format them.
    gv_line_cntr = gv_line_cntr + 1 .
    *--Writing some additional data for the title
    CALL METHOD OF gs_excel 'Cells' = gs_cell1
    EXPORTING
    #1 = gv_line_cntr
    #2 = 1.
    SET PROPERTY OF gs_cell1 'Value' = 'Sheet No' .
    CALL METHOD OF gs_excel 'Cells' = gs_cell1
    EXPORTING
    #1 = gv_line_cntr
    #2 = 5.
    SET PROPERTY OF gs_cell1 'Value' = ':' .
    CALL METHOD OF gs_excel 'Cells' = gs_cell1
    EXPORTING
    #1 = gv_line_cntr
    #2 = 6.
    SET PROPERTY OF gs_cell1 'Value' = gv_intex .
    *--Formatting the area of additional data 1
    CALL METHOD OF gs_excel 'Cells' = gs_cell1
    EXPORTING
    #1 = 1
    #2 = 1.
    CALL METHOD OF gs_excel 'Cells' = gs_cell2
    EXPORTING
    #1 = gv_line_cntr
    #2 = 5.
    CALL METHOD OF gs_excel 'Range' = gs_cells
    EXPORTING
    #1 = gs_cell1
    #2 = gs_cell2.
    CALL METHOD OF gs_cells 'Select' .
    GET PROPERTY OF gs_cells 'Font' = gs_font .
    SET PROPERTY OF gs_font 'Bold' = 1 .
    *--Formatting the area of additional data 2
    CALL METHOD OF gs_excel 'Cells' = gs_cell1
    EXPORTING
    #1 = 1
    #2 = 5.
    CALL METHOD OF gs_excel 'Cells' = gs_cell2
    EXPORTING
    #1 = gv_line_cntr
    #2 = 5.
    CALL METHOD OF gs_excel 'Range' = gs_cells
    EXPORTING
    #1 = gs_cell1
    #2 = gs_cell2.
    CALL METHOD OF gs_cells 'Select' .
    GET PROPERTY OF gs_cells 'Columns' = gs_columns .
    CALL METHOD OF gs_columns 'AutoFit' .
    *--Bordering title data area
    CALL METHOD OF gs_excel 'Cells' = gs_cell1
    EXPORTING
    #1 = 1
    #2 = 1.
    CALL METHOD OF gs_excel 'Cells' = gs_cell2
    EXPORTING
    #1 = gv_line_cntr
    #2 = 6.
    CALL METHOD OF gs_excel 'Range' = gs_cells
    EXPORTING
    #1 = gs_cell1
    #2 = gs_cell2.
    CALL METHOD OF gs_cells 'Select' .
    CALL METHOD OF gs_cells 'BorderAround'
    EXPORTING
    #1 = 1 "continuous line
    #2 = 4. "thick
    *Code Part C.4 Some additional writing to the title area, formatting
    *and bordering around the title area
    *Step 5 Put axis labels to the data area.
    *Code Part C.5 Axis Labels
    *--Putting axis labels
    gv_colno = 2 .
    gv_line_cntr = gv_line_cntr + 5 .
    gv_linno = gv_line_cntr - 1 .
    CALL METHOD OF gs_excel 'Cells' = gs_cell1
    EXPORTING
    #1 = gv_linno
    #2 = 1.
    SET PROPERTY OF gs_cell1 'Value' = 'X' .
    CALL METHOD OF gs_excel 'Cells' = gs_cell1
    EXPORTING
    #1 = gv_line_cntr
    #2 = 1.
    SET PROPERTY OF gs_cell1 'Value' = 'Y' .
    *Step 6 Generate some data.
    *Code Part C.6 Generating Data
    *--Generating some data
    DO 3 TIMES .
    gv_value = gv_outer_index * sy-index * 10 .
    CALL METHOD OF gs_excel 'Cells' = gs_cell1
    EXPORTING
    #1 = gv_linno
    #2 = gv_colno.
    SET PROPERTY OF gs_cell1 'Value' = sy-index .
    CALL METHOD OF gs_excel 'Cells' = gs_cell1
    EXPORTING
    #1 = gv_line_cntr
    #2 = gv_colno.
    SET PROPERTY OF gs_cell1 'Value' = gv_value .
    gv_colno = gv_colno + 1 .
    ENDDO .
    *Step 7 Set source data area for the chart.
    *Code Part C.7 Setting source data area for the chart
    *--Source data area
    gv_colno = gv_colno - 1 .
    CALL METHOD OF gs_excel 'Cells' = gs_cell1
    EXPORTING
    #1 = gv_linno
    #2 = 1.
    CALL METHOD OF gs_excel 'Cells' = gs_cell2
    EXPORTING
    #1 = gv_line_cntr
    #2 = gv_colno.
    CALL METHOD OF gs_excel 'Range' = gs_cells
    EXPORTING
    #1 = gs_cell1
    #2 = gs_cell2.
    CALL METHOD OF gs_cells 'Select' .
    *Step8 Draw the chart
    *Code Part C.8 Draw the chart
    GET PROPERTY OF gs_application 'Charts' = gs_charts .
    CALL METHOD OF gs_charts 'Add' = gs_chart .
    CALL METHOD OF gs_chart 'Activate' .
    SET PROPERTY OF gs_chart 'ChartType' = '51' . "Vertical bar graph
    CALL METHOD OF gs_chart 'SetSourceData'
    EXPORTING
    #1 = gs_cells
    #2 = 1.
    SET PROPERTY OF gs_chart 'HasTitle' = 1 .
    GET PROPERTY OF gs_chart 'ChartTitle' = gs_charttitle .
    GET PROPERTY OF gs_charttitle 'Characters' = gs_charttitlechar .
    SET PROPERTY OF gs_charttitlechar 'Text' = 'Sample Graph' .
    *Step 9 Locate the chart onto the current worksheet.
    *Code Part C.9 Locating the chart onto the current worksheet
    *--Locate the chart onto the current worksheet
    *--Activate current sheet
    CALL METHOD OF gs_excel 'WorkSheets' = gs_activesheet
    EXPORTING
    #1 = gv_sheet_name.
    CALL METHOD OF gs_activesheet 'Activate' .
    CALL METHOD OF gs_chart 'Location'
    EXPORTING
    #1 = 2
    #2 = gv_sheet_name.
    *Step 10 Reposition the chart to a proper place and finish the do-loop.
    *Code Part C.10 Repositioning the chart to a proper place and end of
    *the do-loop counting sheet number
    *--Reposition the chart on the worksheet (cut&paste)
    CALL METHOD OF gs_activesheet 'ChartObjects' = gs_chartobjects .
    CALL METHOD OF gs_chartobjects 'Select' .
    CALL METHOD OF gs_chartobjects 'Cut' .
    *--Select new area
    gv_line_cntr = gv_line_cntr + 2 .
    CALL METHOD OF gs_excel 'Cells' = gs_cell1
    EXPORTING
    #1 = gv_line_cntr
    #2 = 1.
    CALL METHOD OF gs_excel 'Cells' = gs_cell2
    EXPORTING
    #1 = gv_line_cntr
    #2 = 1.
    CALL METHOD OF gs_excel 'Range' = gs_cells
    EXPORTING
    #1 = gs_cell1
    #2 = gs_cell2.
    CALL METHOD OF gs_cells 'Select' .
    CALL METHOD OF gs_activesheet 'Paste' .
    ENDDO .
    *Step 11 Free OLE objects to deallocate memory.
    *Code Part C.11 Deallocating the memory
    *--Deallocating memory
    FREE: gs_excel, gs_wbooklist, gs_application, gs_wbook,
    gs_activesheet,gs_sheets, gs_newsheet, gs_cell1,
    gs_cell2, gs_cells, gs_range, gs_font, gs_interior,
    gs_columns, gs_charts, gs_chart, gs_charttitle,
    gs_charttitlechar, gs_chartobjects .

  • Invalid Address specified to RtlSizeHeap

    I get this error when using some functions of the word2000 function panel.  Any ideas?  Thanks.

    Hi Gris,
    Thanks for the update.  I am glad to hear that the demo works as expected!  I have done some research into this error, and it seems it can sometimes be caused by improper allocation and/or deallocation of memory.  Make sure that you are properly allocating and deallocating memory in your application.  The demo is a great place to start to compare your code to see if there are any functions that are missing or out of order, perhaps.  Also, you might try setting breakpoints and stepping through sections of code before and after this function in your code that it is hanging to make sure that the references you are passing in are, in fact, being referenced properly.  Please let me know if you have any further questions regarding this.  Thanks, Gris.  Have a great day!
    CodeGuru Forums: Invalid Address specified to RtlSizeHeap( 130000, 16dc28 )
    Taylor G.
    Product Support Engineer
    National Instruments
    www.ni.com/support

  • Labview pauses

    I have developed a LabView ver. 7 program which inputs digital data at about 1MByte/sec from a NI 6534 DIO card and writes it to hard drive via. USB-2. I am running it under Win. XP and the application has to run for hours without missing any data.
    The VI will freeze or pause every 1 hr, 3 min and about 20 seconds. It stays paused for 10 -15 seconds, long enough to cause a DIO error, either 10800, 10802 or 10845 each time it pauses.
    I have run a similar program under Win 98 in the past with out this problem. I have searched for programs running in the background such as firewalls, antivirus, etc and uninstalled all that I can find.
    The first occurrence of the pause occurs at a random time after starting LV and then at 01:03:20 thereafter so It does not appear to be LV related.
    Has anyone seen this behavior before?

    Ok... this is some good info on your system.
    Off the top of my head, I am now curious as to how you're storing your data that is acquired. How are you buffering it and how are you saving it to disk. Are you building arrays at run time?
    A constantly increasing page fault total usually is an indicator of dynamic memory allocation at run-time. Your program may also be deallocating the memory which could possibly be why your memory sizes don't change much. LabVIEW would be doing this all for you based on your program design, which may be the cause of the problem.
    I believe you said you had LV version 6... I'm not sure what version it is available in but there is a tool in the latest version that will show where data buffering takes place--where data on your wires is being copied. As a general rule, it's best to avoid making copies of the data as much as possible.
    There is also an article by NI on how to set up your data structures and arrays when using them in loops so as to help LabVIEW manage the data as efficiently as possible. I would definitely recommend reading that and seeing how your program matches up to the suggestions made in the article. If you have poor implementation of a data array inside of an acquisition loop it can cause quite a bit of dynamic memory allocation/deallocation which in turn can cause random unforseen delays due to interaction with the OS when it tries to allocate that memory.

  • Why would you think java is a better beginner language then c/c++ ???.

    Why would you think java is a better beginner language then c/c++.That is if you think it is

    1.)because it stear's you towards useing oop style programing.
    since nearly everything relate's to object oriented programing.
    2.)this forum alone. is a reason thier are comprehensive example's for beginers. and so many people many very freindly and dont mind answering a question. Other beginners are here also who share what they know with each other.
    3.)learing curve for useing the language and geting started immediately is good.
    4.)once you learn java and then goto c++ you have another probably better perspective on how to code.
    5.)codeing in java avoids deconstructors pointers and direct manipulation of reference's. which can be very confuseing for beginers
    and deals with variables that directly point to the computer's memory.
    and proper deallocation of memory.
    though im just a begginer myself i started trying c++ and switched to java.
    however thier are somethings in java that can be as complex as c++
    when pointers or reference's are needed but not available.

  • Component Serivces - Documentation

    Is there any documentation available for the osoft component services running on the server? Specifically, the OSoftDMServer seems to consume a lot of memory. Does anyone know what this service does....should it consume >250MB of RAM when doing apparently nothing?

    That component is executing SSIS packages. Depending by what is doing that package the COM+ component can request a lot of memory.
    For example when you are dooing an import for big file then that component it can allocate a lot of memory.
    The process name where this compoennt is created is dllhost.exe
    Usually the allocation and deallocation of memory is done corectly.
    It seems in your case something is not working correct and release of memory is not done correct.
    Regards
    Sorin Radulescu

Maybe you are looking for

  • How to reduce render time?

    I have created two separate events in FCP X that are both completely done and fully rendered.  I now want to combine them onto one timeline and then send them to Compressor to burn a DVD for a client.  It is frustrating to have to wait for this new 3

  • Reg: IDOC Creation on target side

    Hi guys,             In my file to IDOc scenario ,i have requirement as one field is coming feom file ,if this field input value comes  three  time with the same value then create one IDOc and three  line item under that idoc , can any help me. Thank

  • TMG 2010 Preauthentication for Exchange 2013 Active Sync

    Hello, Does someone use it? Is it still needed with Exchange 2013? I am using ARR now, but it does not have firewall.... It saved me a lot with Exchange 2007. Before I implemented it, we had a lot of locks with mobile users.

  • Connect oracle database

    Hi Expert,       I am new into VC. How to connect Oracle Database in VC for Insert,edit,delete I have following requirements... I have 2 input fields    1. Name    2  AGE then 3 buttons    1. Insert    2. edit    3. delete If click Insert button  dat

  • Data in AdvanceDdataGrid not changed

    Hello all, I have really weird problem, I think it's related to datprovider or something similar. I have data grid in ac class (as attribute of this class), in the main app, I was import that class and create new instance, and create ArrayCollection