leak memory when using region.put

I see strange behavior when you use the c# gemfire client. I see the memory leak on the key and value when putting them in the region.

After further investigation, I see that the GCHandle created in the SafeM2UMConvert() is not released correctly. However, surprisingly, when I put the value and null key (note the commented line), the key and value are properly cleaned. Wonder if anyone can provide an explanation of this behavior?

* I think that the key and value will be abolished when the gc, which is not the case either. I tried to call after put gc.collect but it doesn't help.

Here's a bit on the implementation

function Add()

{

Lock (Sync)

{
var key = new Key();
var value = new Value (key);
Region.Put (key, value);

Key = null;

value = null; These 2 lines made of magic
}

[Serializable]

public class key: IEquatable < Key >, IGFSerializable

[Serializable]

Public class value: IGFSerializable, IEquatable < value >

Here's some of the call stack where the Manager is created (I used the momory .net Profiler to get it).
mscorlib! .. System.Runtime.InteropServices.GCHandle ctor (object, GCHandleType)
mscorlib! System.Runtime.InteropServices.GCHandle.Alloc (object)
GemStone.GemFire.Cache! < Module > .gemfire. ManagedCacheableKey. {ctor} (ManagedCacheableKey *, IGFSerializable)
GemStone.GemFire.Cache! < Module >. GemStone.GemFire.Cache.? A0xa28d4856.SafeM2UMConvert < struct GemStone::GemFire:Cache:IGFSerializable, gemfire::ManagedCacheableKey of the class, the class gemfire::Serializable, class GemStone::GemFire:Cache:Serializable > (IGFSerializable)
GemStone.GemFire.Cache! GemStone.GemFire.Cache.Region.Put (ICacheableKey, IGFSerializable, IGFSerializable)
GemStone.GemFire.Cache! GemStone.GemFire.Cache.Region.Put (ICacheableKey, IGFSerializable)
Add()

by default local caching is enabled, then enter / was able to remain in the local process. You can just put the entries and observe the process memory size increase. You can set the attribute region "caching enabled = false '. And then see if process increases with the number of entries.

Tags: VMware

Similar Questions

  • I need to free up memory when using createRootObject()?

    If I load a qml page and view it should I release when the page is closed?

    For example

    QmlDocument * qml = QmlDocument::create("asset:///main.qml").parent(this);
    If (qml) {}
    _Page = qml-> createRootObject();
    }

    hand. QML

    Page

    {

    Container

    {

    Some controls

    }

    }

    Then when I close the page that I must free _page or _page belongs to the app and it's free when the application closes?

    Also, note that, for some reason, signals are not disconnected when components qml are removed.
    I had this problem a few times when I plugged signals in the dynamically created pages.

    my usual approach is now delete pages in the slots of onPopTransitionEnded/onNavigateToTransitionEnded of the navigation pane.

  • Out of memory when the function call (CopyTabPage)...

    Hello

    I get error "-12 out of memory" when using CopyTabPage (Panel, TAB, 0, Panel, TAB,-1) on my request (the first duplication tab).

    There are several levels of tab panel system (like this example)

    \tab_1 \sub_tab_1
            \sub_tab_2
            ...
            \sub_tab_16
    
    \tab_2  \sub_tab_1
            \sub_tab_2
            ...
            \sub_tab_16
    
    \tab_3  \sub_tab_1
            \sub_tab_2
            ...
            \sub_tab_16
    
    \tab_4  \sub_tab_1
            \sub_tab_2
            ...
            \sub_tab_16
    

    Each sub-tab panels contains appx. 16 x 60 controls (digital, ring, String) and some of them also stripchart graphics.

    I have reached the limit of the CVI? Are there things to check? (I develop under CVI 2012 SP1).

    May - so that someone knows how to fix this?

    Thank you

    George


  • Memory leak when just launched and the idling... corrections when used?  [HELP]

    So I'm in the stage of debugging and test my application and use of this tool for tracking memory leaks ( https://github.com/mrdoob/Hi-ReS-Stats )

    When I run my application my numbers are

    FPS: 61/60

    MS: 17

    MEM: 3.157

    MAX: 3.157

    Now my memory starts immediately from 3.157, 3.167, 3.177 3.187 3.197 and so on.

    Now, if I do any selection of nav in my application

    Changes down to approximately 3,215 MEM

    but then it starts to count down again 3,215 3,225, 3.235, 3.445 3.455

    I don't have loops that pass.

    Has anyone encounter this?

    I'm almost tempted to force garbage collection every 60 seconds that the application is inactive or something.  Not the best way to handle this...   I don't know where the leak occurs.

    Any help is appreciated!

    See you soon!

    Oh man!...   So I created a new stage and only put the Profiler on the stage... and it's the same thing.  ...    So I think it's the Profiler itself which causes memory to continue to increase.

    Then...    How can we really test my application for leaks memory, etc. ?

  • Will be the leak memory for the queue when it is used in producer and mode of consumption data acquisition transfer different size table.

    In data acquisition, I use a loop to query the data from the hardware, another loop to receive the data from query sent by queue loop.

    Each time the size of the transferred data matrix is perhaps not the same, so the system can assign different table size and recycle frequently.

    It cost memory leak. Or it will slow down the performance, given that the size of the array is not fixed, so everytime need to create a new array of size.

    Any suggestion or the best method.

    If I understand your description, your DAQ loop acquires data with the parameter of the function of reading-'1 ' for reading at the DAQmx samples. This translates into different picture sizes.

    Passage of these tables directly to a queue is valid and she didn't mind important in performance (at least AFAIK) and it certainly does not leak memory.

    So the question is more or less:

    It is valid that the consumer receives sizes different picture for analysis? How your consumer manages these tables?

    hope this helps,

    Norbert

  • I have a strange problem with my RAM supported by installers. When I check the activity monitor, 3 installers are open and they start around 80 MB memory RAM used for about 7 or 10:08 minutes or so.

    I have a strange problem with my RAM supported by installers. When I check the activity monitor, 3 installers are open and they start around 80 MB memory RAM used for about 7 or 8 concerts after 10 minutes. I have to force them to quit, but I don't know what I am closing or why they open in the first place. Applications downloaded on iTunes?

    In addition, the Console has opened with the same message several times, but I don't know what that means.

    Any help would be appreciated.

    Hello

    The last is a picture of the Terminal window.

    Just because it lists 'Console' does not mean that it has nothing to do with this application.

    You have not said why or what you're trying to install so I can't help with that.

    You can use the activity monitor to leave their.

    After you select an item, use the X in a type of stop sign icon and confirm force quit.

    21:36 Thursday; September 15, 2016

     iMac 2.5 Ghz i5 2011 (El Capitan)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro (Snow Leopard 10.6.8) 2 GB
     Mac OS X (10.6.8).
     iPhone and iPad (2)

  • Coregen memory when you use defined VI block memory

    I currently have a problem when you try to compile a VI for my card Flex RIO (SMU-7965R).  I have a sub - vi which contains a small instance memory set by VI (U16 X 256 elements) and a block of DSP48.  This VI is instantiated 128 times in the top level VI.  When I set up the memory set by VI to target the block of RAM in the FPGA, the compilation process is suspended during the generation of the nuclei (memory after ~ 45 min).  LabVIEW treats each instance of as single block memory when executing coregen?  I do not experience this problem when I set up the memory set by VI using LUTs.  Any thoughts would be appreciated.

    Thank you

    Brian

    Hi Brian,.

    I believe that this compilation failure could be less related to the implementation of memory coregen, rather the memory of the way that is implemented in the lut and block memory on an FPGA. Lut are built through flip-flops and are perfect for storing information 100-300 bytes, while the memory block is segmented in a fixed size of 2 k RAM embedded. There are only a number of structures of block of RAM in a given FPGA and it seems that in your case that you use more of your resources block of allocated RAM. For example, in the 7831R if we tried to implement a FIFO in the maximum possible storage size block memory would be 81 920 bytes due to the limitation of resources.

    The implementation of flip flop of the LUTs will allow the compiler greater flexibility in the use of resources in compiling because the size of the LUT is not fixed in the way that is a block structure of RAM. This is probably the reason why this LUT implementation is compiling successfully while the RAM block is not in this case.

    Kind regards

    Blayne K

  • leak memory using daqmx with c#

    Hello

    I m of the problems using the c# to DAQmx API. I have attached a sample program to demonstrate the way in which I use the API.

    The problem I m facing is that the application needs memory more and more over time. My hypothesis is that leaking memory has occurred somewhere I tried different ways to call the API and read the documentation on methods, but I still didn t manage to get around this problem.

    Any help is the aprechiated!

    PS: A brief description of my program:

    -Create tasks (DI, HAVE, AO)

    -Add channels (DI, DO, HAVE,)

    -StartTasks

    -Start the Thread and cyclical read/write of the current values to/from local variables

    Hi niwaly,

    I recommend that you test the examples. This way you can be sure that the issue is not the driver itself, and you can debug your application. It can also give you a clue on how to proceed.

    If you have any examples in the file that I mentioned, you have not installed the driver with c# additional support during the installation procedure.

    Here are some examples:

    http://www.NI.com/white-paper/6999/en

    Kind regards

    Heinz

  • When I use to put a cd or a usb device in, a box come send me choices what to do with them. It is no more.

    Original title: dialog box

    I have windows xp [sp3] when I use to put a cd or a usb device, a box came sends choices what to do with them.

    Is no more, I can still do my help manually.please of choice.  of zanndy.

    Hi Zanndy,

    I suggest you to consult the article in the Microsoft Knowledge Base and check.

    The Autorun feature or the AutoPlay feature does not work when you insert a CD-ROM into the CD drive

    http://support.Microsoft.com/kb/330135

    I hope this helps.

  • When using the 'typewriter', then put it a 'text area' at the border around the words, the word 'fade' o

    When using the "typewriter", then put a border of the "text area" around the words, the word "melted" and only can be seen.  How to fix?  Thank you

    I'm afraid, there is no option to this toolbar in Acrobat X quick tools. It of a dynamic toolbar and gets changed based on the selection.

    However, you can do it in Acrobat XI.

  • Where do I put the AutoFill feature when using Firefox?

    You people do a great job of describing 'How to use Auto Fill'... but nowhere in this article does say WHERE - to implement the feature when using Firefox.

    How and where can I find the setting?

    Thank you.

    PS: maybe that should be in the article somewhere.

    What about filling the data in a form (input field) on a web page?

    See:

  • Leak memory in a simple loop to save data in the table?

    Hello world

    I'm trying to set up a simple code to read a certain amount of data in a table at a fixed sampling rate and put these data in a local variable.  I'll put this on one OR cRIO-9073 using the scanning engine and the data comes from one NOR 9208 with a speed of approximately 250 Hz scanning, even if it is not really important at the moment.

    I made this little test VI which I suspect contains a memory leak, but I'm not able to identify it.  The reason for my suspicion is that when I run the vi on a VMWare virtual machine (LabVIEW 2010 on Windows XP) it claims soon that it is short-term memory.  Of course, the problem is perhaps elsewhere, but I hope that someone more experienced with LabVIEW programming will be able to find all the bugs very easily because it is really a piece very simpel to code. :-)

    I have included a copy of the VI with a screenshot to illustrate.

    Regards, Martin

    PS my code looks a bit awkward, so if anyone has a better solution, I'd be very happy to learn about it!

    Hello Martin,

    I would try a different approach to your problem. Currently you reshape your table each iteration of the loop. This means that the allocator memory of LV must find a new piece of contiguous memory each iteration of the loop. You're probably fragment your memory and so short of contiguous blocks of memory, leading to the release of messages from memory.

    For these types of tasks, I recommend having an array of fixed size that you initialize outside the loop and then use the Replace table subset in the loop for updating the values. This avoids the problem of allocating memory you use in.

    Alternatively, since I assume that you use the local variable to pass data to another loop, you can use a FIFO RT to manage data. A RT FIFO resembles a queue of LV, but it is designed so that you can keep determinism in your application. Set up an acquisition loop that exports data from the 9208 every 4ms in a RT FIFO. Then set up your processing loop to run at a slower pace - say every 200ms. The processing loop reads all the elements of the FIFO until it is empty every 200ms or a number of samples. The RT FIFO is fixed size, if you need to make it large enough to contain at least 200/4 = 50 samples. For more security, you should do several times bigger, maybe 200 samples. You can try different sizes of the FIFO and also to the different periods of your processing loop to your application's specifications.

    Using this method you do not have to create a counter to track items, since the reading of FIFO function can tell you how many items is in the FIFO and also when it is empty.

    I recommend you the example of Communication of FIFO of RT which comes with LabVIEW to get an idea of how to use these functions.

    Gerardo

  • Leak memory with Explorer.exe in the videos folder.

    Leak memory with Explorer.exe in the folder of videos with thumbnails enabled. Using the resource monitor, I can see that explorer.exe is playback of video files, while the memory gradually increases until it is 99%. No such problem with memory leak when I put the provision 'list' (i.e. without thumbnails). Disabling thumbnails also eliminates the problem of memory leak, but this isn't what I want.  Main videos folder is. MKV files, with the codec video within the container MKV h.264 high profile. I tried to dissociate all media files with Media Player Classic Home Cinema (which I use to watch mkv videos).

    More important, this problem seems only appeared after I installed SP1.

    Win7 x 64 Ultimate SP1, C2D E8500 8 GB of RAM, Western Digital 2 to Green Caviar.

    More info: I realized that this only happens with the video files that don't have any generated tile. It's like Windows Explorer is reading through the entire video file to generate a thumbnail, but even after awhile that yet, it does not generate a thumbnail.

    How to fix? Help! Thank you!

    OMG, I DISCOVERED WHY. IT IS DIVX HE WAS CAUSING. THE MOMENT I HAVE NOT UNINSTALLED NO MORE PROBLEMS! LIVE DIVX!

  • screen saver turns on when using FaceTime

    Since the update to MAC OS Sierra, I noticed that my screensaver activates when using FaceTime - most annoying because I have to quickly move the mouse to put it all again.

    He didn't get it until I've updated from El capitan, so I guess it's something to do with MacOS Sierra.

    He's not doing it with Youtube but I'm still trying with Skype.

    Screen saver works as it should do it with an ordinary application (for example, safari, etc.) Pages) if I don't move the mouse or keyboard for the specified time (five minutes).

    I do not have hot set of corners, the display is set on turn off (energy prefs is system) after 10 minutes. Screen saver is five minutes of inactivity.

    I have an iMac 27 "retina, first generation (a little less than two years) with i5 and 16 gig memory, standard graphics M290X.

    I missed easy adjustment here?

    I have it, feel also my parents as well.

  • leak memory in time real PDM

    Hi, this is Lee.

    I had the very serious problem.

    I'm currently building the real-time data recorder.

    But I found that there is a leak memory while I wrote the TDMS files.

    Let me explain further.

    Please watch for my project, I downloaded.

    There are target real time program. The title is "untitiled.vi".

    As you can see, I think that there is no accumulation of memory components...

    But if I don't have VI as 12 hours... it consume slightly patteren.

    Run Loganalizer.vi. or you can visit memory.jpg.

    I don't know why, but after he loses 17kBytes memory.

    Well... 17 KB of memory is not a big problem at the moment, but I intend to run this recorder as 2 months.

    This will eventually crash by memory loss.

    Thanks in advance.

    Hi Lee,.

    What do you mean by leaks memory, have you seen the increasment of memory when you run the VI without shutting it down? Or did you have seen memory leaks after you run the VI for 12 hours and STOP the race?

    If after a stop running, you see always 17 KB of memory "leak", what about you close the VI? Since it is possible that VI himself attributes may use of memory when running.

Maybe you are looking for