LabVIEW optimization of memory allocation
Never thought while staring at me on purpose to create a labview application that I need to be a computer expert! However, I am still sustained here on this forum, I thank you all and here's another!
I have developed a large application that calls subvis dynamically. Whenever a called dynamically Subvi is closed and another is responsible, the memory of the previous Subvi is not released. Therefore, I could see in the resource manager that my memory RAM 'physically used' keep creeping up, closer to the memory of 8 GB.
All I want is when I close a dynamic called Subvi, all memory he held RAM is released and all its data are kind of thrown out of RAM. Is this possible? Or I'm going to be ridiculous!
See you soon
Waris K
Have you tried the function request deallocation ?
Tags: NI Software
Similar Questions
-
Get the DLL string (memory allocated for DLL)
Hi, I'm aware there are a lot of discussions around this topic, but there are a lot of variations and I've never used before LabVIEW, and I seem to have a hard time at a very basic level, so I hope someone can help me with the below simple specific test case to put me on the right track before I pull my hair remaining.
I've created a DLL with a single function "GenerateGreeting". When it is called, it allocates enough memory for the string "Hello World!" \0"at the pGreeting of pointer, copy this string to the pointer and sets the GreetingLength parameter to the number of allocated bytes (in the DLL in the end, I want to use, there is a DLL function to free the memory allocated for this way).
I created a header file to go with the DLL containing the following line.
extern __declspec(dllimport) int __stdcall GenerateGreeting(char* &pGreeting, int &GreetingLength);
I then imported the LabVIEW file using the import Shared Library Wizard. That created a "generate Greeting.vi' and everything seems somewhat sensitive for me (although this does not mean a lot right now). When I run the vi, the ' GreetingLength on ' display correctly '13', the length of the string, but "pGreeting out" shows only three or four characters (which vary in each race), place of the string that is expected of junk.
The pGreeting parameter is set to the 'String' type, the string "String pointer C" format, size currently Minimum of 4095. I think the problem is that the DLL wants to allocate memory for pGreeting; the caller is supposed to pass a unallocated pointer and let the DLL allocates memory for the string the right amount, but LabVIEW expected the DLL to write in its buffer préallouée. How to with LabVIEW? Most of the functions in the DLL in the end, I want to use work this way, so I hope that's possible. Or I have to rewrite all my DLL functions to use buffers allocated by the appellant?
The vi , header and the DLL are atteched, tips appreciated. Edit - cannot attach the dll or the headers.
tony_si wrote:
extern __declspec(dllimport) int __stdcall GenerateGreeting(char* &pGreeting, int &GreetingLength);
Although char * & pGreeting is actually a thing of C++ (no C compiler I know would accept it) and this basically means that the char pointer is passed as a reference. So, technically, it's a double referenced pointer, however nothing in C++ Specifies that reference parameters should be implemented as a pointer at the hardware level. So free to decide to use some other possible MECHANISM that takes the target CPU architecture support a C compiler constructor. However, for the C++ compilers, I know it's really just syntactic sugar and is implemented internally as a pointer.
LabVIEW has no type of data that allows to configure this directly. You will have to configure it as a whole size pointer passed as a pointer value and then use a call MoveBlock() or the support VI GetValuePtr() to copy the data on the pointer in a string of LabVIEW.
AND: You need to know how the DLL allocates the pointer so that you can deallocate it correctly after each call to this function. Otherwise you probably create a leak memory, since you say that the first 4 bytes in the returned buffer always change, this feature seems to assign to each run of a new buffer that you want to deallocate correctly. Unless the DLL uses a Windows such as HeapAlloc() API function for this, it should also export a function according to deallocate the buffer. Functions like malloc() and free() from the C runtime cannot always be applied in the same version between the caller and callee, so that calling free() by calling on a buffer that has been allocated with malloc() in the DLL may not work on the same segment of memory and result in undefined behavior.
-
Change the memory allocated for the graphics?
Hi, I have an Equium A60-181 with graphics ATi Mobility Radeon 7000. For the moment, that this GPU is using 64 MB of my system RAM that result with only 448 MB of RAM (512-64) for Windows. For a video resolution of 1024 x 768 32 bit it's a ridiculous amount of memory since it only really requires 4 MB for this. I'm not interested in games or 3d graphics, so my question is if I can change the memory allocated to recover more memory system?
see you soon,
Richard S.
HI Richard,
ATi drivers include an improved graphics option devices-> display manager that allows the value of the AMU to change. My SA30 supports load 16 MB, 32 MB, 64 MB and 128 MB.
The same value UMA adjustable in BIOS Setup Panel.
HTH
-
Memory retains increaing and this VI a lot of resizing of memory allocation events
This application increases slowly the memory and after 12 hours, I'll get labview for error memory. With the desktop execution Trace Tool kit, I found Vi (attached) is called a lot and a lot of memorry allocate, free one resize events.
I have this Aplication but I see that the reference is not closed, I do not see the leaks of reference on the destkop trace Toolkit
guys do you have an idea what could be?
After 17 hours and 47 minutes the progam still works. These reference was the problem. they appear to be leaks of reference on the trail of the funds taken kit until I closed the program.
Thank you
-
Change THE Memory Allocation 6.0.
I own a 7 '' netbook Sylvania, with 128 MB of RAM and Windows CE 6.0 OS. There the cursor to change the memory allocation between the PROGRAM and the STORAGE, but it won't budge. To get YouTube running on this thing, I need to go 68 MB of RAM allocated to executing programs for about 130 MB, taking storage (use an SD card to make up the difference - easy). Is there a way to unlock the slide or modify the default setting through the registry hive files? I have already made some adjustments with explore in this way and have managed to add a file to it. I understand in hex. Thank you!
Hello GusCD6,
The best place to ask your question on Windows CE 6.0 is in the MSDN forums for the development of Windows Mobile. Click here for a link to the Windows Mobile Development Forum.
They are there, the experts and would be better able to solve your problem of Windows CE and help answer your questions.Sincerely,
Marilyn
-
Optimize/defragment memory?
Hi, have just bought the Sansa Fuze 8 GB (great bit o ' kit!) Am running windows XP, using windows media player using the MP3 format and MTP mode.
My question is I've seen deleted a lot of tracks from different CDs, I loaded to the device, I wonder - is it necessary to defragment the memory to optimize the gaps in that causing?
I tried to use my pc Defragmenter but cannot access a memory of the rocket with my Defragmenter.
Is it possible to optimize the memory at all or or is the "rocket" optimize its self when titles are deleted?
Thanks in advance.
Kind regards
Youric.Flash memory, being solid state, takes up no more access to scattered areas he done for access areas. It may be possible to defragment but it is completely useless. In fact, I think I read that it would do more harm than good. Flash memory has a limited number of writes per sector (but the number is still quite important), so defragmentation "wears" the faster memory.
-
Maximum memory allocation for HP Pavilion dv7-7010us
HP Pavilion dv7-7010us
Windows 7 (64-bit)Hello!
As shown in the topic, I'm looking for the maximum memory allocation for my new HP Pavilion dv7-7010us notebook.I am aware that my computer has two memory slots filled a 2 GB DDR3 SDRAM and a 4 GB DDR3 SDRAM.
If anyone could also tell me the perfect combination of chip (2 x 4 GB, 2x16GB, etc.) to get the maximum memory allocation, that would be much appreciated. Thank you!
-AngeloHi, Angelo:
Here is the link to the service manual for your laptop.
http://h10032.www1.HP.com/CTG/manual/c03221579.PDF
Supported memory configurations are in Chapter 1, page 4.
Paul
-
I thought that I understood that I could set up a file.sys page on any available partition on Windows, if I wished, for example, to create more virtual memory or move a file to another drive. However the changes I make to my computer are not appearing in the system information, after a reboot - why is - this?
I have successfully configured internal auxiliary training to take on a pagefile.sys when you use the system advanced settings in the computer file system properties. Page created on the auxiliary drive single file memory is equal to once and a half the size of the physical memory of the computer.
As I had created a larger file of the Page on the auxiliary drive, I then decided to reduce the Page file on the boot up to 300 MB drive. When I did make changes, I clicked on the set then OK and then I rebooted the entire computer.
After restarting the computer, I tried to check system information for a summary of the changes I had made to the file Page and virtual memory space and I was disappointed to see that the pagefile on the auxiliary drive does not show upward. Information system had just recorded space Page MB 300 in C:\pagefile.sys file, and there is no trace of the larger Page file that I created on the auxiliary drive. How is that?
If I go back to the virtual memory window in advanced system settings, it clearly shows I changed two files Page. Yet in Information System shows only the boot Page file drive. How is that?
I always use Internet Explorer with only 300 MB Page file space, and it works really faster than the default virtual memory allocation, however the system soon slows down after opening about 5 instances of Internet Explorer and the system starts asking to close application windows down to save memory. So why does the system not switch to use the Page file on the auxiliary drive?
Hello
Thanks for posting your query in Microsoft Community.
I suggest you to report this query in TechNet forum for better support.
https://social.technet.Microsoft.com/forums/en-us/home
Be sure to visit Microsoft Community, if you have any questions in the future.
-
We use the desktop computer intel i3 3220 cpu with operating system windows 7 ultimate 32 / 64 bit os that quantity grafics memory will be allocted to me of my 4 GB of ram? Also please intimate how to check and change the assignment
Hi Brandon,.
I suggest you to see the following links on memory allocation works.
Usable memory may be less than the memory installed on Windows 7 computers
-
Cannot install software due to lack of memory allocated
I use 4 Fusion on a Mac Book Pro with 4 MB, when I try to install new software via windows, there is only 1 MB of memory allocated and the software requires 2MB, how to adjust the allocation of memory?
Shut down Windows Virtual MAchine (MAchine virtual menu > Shutdown)
Click Virtual Machine > settings > processors and memory
Change the value of memory 2048 MB. Click View all.
Close the settings window and start windows.
-
Fire of sql require separate memory allocation
Hello
So I tried light sql and trying to put things up. I had a question on how data is managed in memory regarding the memory available for sqlfire.
First of all,-sqlfire has a default amount of memory allocated when we have a home server? I didn't notice settings during server startup to say he could use x amount of memory.
Also assume that I have 2 members in my cluster (running with 4 GB of memory available) and I have millions of lines that could not fit in available memory. Data would be saturated on the disk?
See you soon
-Imran
You can explicitly set the initial heap and max - heap for the server at startup. Sqlf server aid Fund
By default, lines are only in memory.
If you set the initial heap and max heap and there is no more than ability, you will get an exception. If you do not use these parameters, you run the risk of running out of memory server.
To outflank your tables, you must explicitly create the table with the configuration of overflow. Keys and indexes are still in memory even when overflow you.
-
Oracle 10g, how to determine the memory allocated is healthy or sufficient.
Hi guys,.
I have a 10.2.0.5 production database.
Currently, my server has 8 GB of physical RAM.
/ 3GB is allocated to the SGA and 1 GB for the PGA.
Let's say a day is needed for the application (for example, weblogic) to increase the pool of connections from 20 to 50.
How are we able to know if the memory allocated is sufficient for the existing load as well as the increase in workload?
CPU is altogether would apply us we can generate on the CPU. If the load is low, I assumed is quite safe to increase the connection.
Please share your experiences of dealing with this situation.
Thank youChewy wrote:
How are we able to know if the memory allocated is sufficient for the existing load as well as the increase in workload?There are a set of views memory Advisor which will tell you if your memory structures of appropriate size:
v$ db_cache_advice
v$ shared_pool_advice
v$ java_pool_advice
v$ sga_target_advice
v$ pga_target_advice
--
John Watson
Oracle Certified Master s/n
http://skillbuilders.com -
Virtual machine consumes memory allocated all
I have 4 ESXi 4.1 on Dell PE R610 servers. I used the installation ISO Dell from their support site media to install ESXi 4.1.
I noticed that all virtual machines consume all the memory allocated to it.
In other words, if I look at the memory of all resource allocation the VM is private.
It has no memory shared to do so.
I did not make reservations for the virtual machines.
Someone at - it other ideas as to why this could happen?
Thank you
This "problem" has been discussed a lot already, see threads like these:
http://communities.VMware.com/message/1487356#1487356
In short:
ESX 4.x use large memory pages by default. Find duplicates MB 2 pages for GST is almost impossible with them. You can set the Advanced setting mem.allocguestlargepage to 0 if you want to force the use of small pages, but ESX breaks down large pages under contention memory itself.
-
Resizing of the memory allocated to the virtual machine
Hello
I use VMPlayer on a XP and Ubuntu invited crowd.
I was wondering if I could resize the memory of my Ubuntu virtual machine by changing the value of the variable memsize in 512 to 1024 vmx configuration file or if something more complex needs to be done?
Thank you very much.
T bar
Yes, with the Machine virtual shutdown, not suspended, and it's best if you close the VMware product too.
Also have you looked in the help file in VMware Player? With VMware Player 2.5 (haven't looked at VMware Player 3 yet). ... under... Running VMware Player > configure memory Allocation change
-
iOS app breaks down at the return of cameraUI - a memory allocation problem?
Hey all
try to complete my first application
When running on iOS, the application crashes SOMETIMES after returning from cameraUI ("use" / MediaEvent.COMPLETE or cancel "/ Event.CANCEL" "").
When I leave some other applications running on my iPhone 3 g (and not many are open), the problem goes away, which makes me think it is a problem of memory allocation
in this aspect, can I trust the iOS to leave inactive applications to allocate more memory for my, currently active, AIR application?
(there is no memory leak)
This is a version of os running iPhone 3Gs 4.3.5
the app is made with Flash Pro 5.5 overlaid with AIR 3.1 sdk and deployed by using the "deploy to app store" type (which should be the most free)
(no crashes on Android or desktop versions)
someone had this problem of cameraUI or a similar where an application crashes if more then some numbers of applications are open?
thanx
Saar
Hello
Thanks for reporting the bug. This problem is known to us, and it is currently under investigation. As far as I know, there is no work around.
Kind regards
Samia
Maybe you are looking for
-
Equium A300D - microphone and speakers are not working
I have an annoying problem. With my soundcard on its default pilot, I can't the microphone (taken before) to pick up something. Yet when I update with the latest drivers I then lose the speakers onboard and cannot get sound by connecting external spe
-
I saved a file of library of types as explained here: http://digital.ni.com/public.nsf/allkb/4F811A9B23F1D46E862566F700615B7A. The library, I registered is available to select using the invoke node. I tried to run a simple method, as shown below: Whe
-
Become the only aministrator on my Dell latiitude D600 windows ZP pentium M laptop
Remove the old administrator om my computer DEll laptop latitude D600 windows XP pentium M model... Help? E-mail address is removed from the privacy *.
-
What is the best way to "clean up/free space" on my computer? Thank you
What is the best way to clean/free up space on my computer? Even do not know where to look to see how much space I use... Thank you.
-
Webcam no longer works after getting the repaired computer
My laptop crashed and after getting it fixed, my webcam is not working. I have to re - install something to make it work again?