How to limit the memory usage of WinCE 6? - memory

I have compiled a Wince 6 kernel using VS2005 platform builder. The target system have 256MB RAM, but I only want Wince 6 to use 128MB. How can I set this up? I am assuming to put maxmem=128MB in boot.ini, but I cannot find boot.ini in my wince 6 source code and any file inside platform builder directory.

Update the RAM mapping in config.bib.

I think it a good thing to share too....
for example i fyou have a physical RAM 128MB. than your NK size is for example 30MB.
the total size reported you your system will be somehow less like 96MB because the NK are also occupied the RAM at the runtime.
/nansah

Related

Visual Studio Emulator for Android memory minimum?

I'm using the VS emulator for Android with Visual Studio 2015 Community (Update 3). When I run a Xamarin project this error displays:
The emulator is unable to verify that the virtual machine is running: Not enough memory is available to start an emulator that uses 3072 MB of startup RAM.
OK, from this page https://msdn.microsoft.com/en-us/library/mt228280.aspx we see the system requirements where we need Hyper-V support and 6 GB or more of RAM.
My laptop has 4GB 8GB RAM plus swap space. When I allocate 3072 MB to the virtual machine through the Hyper-V Manager, the emulator starts but running and debugging is slow, of course because now there's only 1GB of RAM for VS and whatever else is running. (Yes, I try to minimize other RAM usage...)
So I wanted to reduce the footprint of the VM. However, and this is the common mistake some people are making: Reducing the size of the VM doesn't reduce the amount of memory that VS wants, it only reduces the available memory. And if the available memory is less than what VS wants we get that error.
So my questions are:
1) Can we modify a config somewhere to reduce the amount of RAM that VS wants in a virtual machine?
2) Is there an XDE.exe command-line somewhere that gets used where we can set the memory?
3) And ultimately, can anyone provide a good reason why an emulator requires 3GB or more of RAM? I don't want to suffocate the execution of the environment but I don't want it to take a lot more than it really needs either.
C:\Users[YourUserName]\AppData\Local\Microsoft\VisualStudioEmulator\Android\Containers\Local\Devices
Just head to this URL and you will find the files
Now you will just have to open each one of them and change this line content, replacing the value with “1024”:
I open "Hyper-V Manager" and edit it's memory in setting Pane. So easy

Netlogo v.4.0.5memory issues and I've tried everything I could think of

I am running a Netlogo model in v. 4.0.5 and the model uses too much memory and then quits. I have tried to change the memory limits per the instructions in the user manual to no avail. The program doesn't even open when I make increase the memory. I can't run it through RNetLogo because it no longer supports version 4. I know this topic has been touched on before but the previous responses have not resolved my issue. I've changed the output to table instead of spreadsheet as well. I'd like to up the memory to at least 3GB. Any help would be greatly appreciated!
By default, NetLogo 4.0 (which dates all the way back to 2007!) runs in 32-bit mode on Mac OS X, which limits your heap size to 2G.
You have two choices:
Choice 1: Upgrade to NetLogo 5.0 or later. These versions run in 64-bit mode by default.
Choice 2: Launch NetLogo 4.0 from the command line, instead of using the provided app bundle. Info.plist will be bypassed, so you specify the heap size you want on the command line instead. These commands seem to work on my Mac:
export JAVA_HOME=$(/usr/libexec/java_home -v 1.6)
cd /Applications/NetLogo\ 4.0.5
java -server -d64 -Xmx4096M -jar NetLogo.jar
After launching NetLogo this way, in the System tab of the About NetLogo dialog I see:
Java HotSpot(TM) 64-Bit Server VM 1.6.0_65 (Apple Inc.; 1.6.0_65-b14-466.1-11M4716)
operating system: Mac OS X 10.10.3 (x86_64 processor)
Java heap: used = 8 MB, free = 176 MB, max = 3640 MB
note "64-Bit Server" and the higher-than-default heap max value.
It might also be possible to somehow edit the app bundle to launch in 64-bit mode; I don't know.
Before you add more memory I'd double check my program for nested loops. It's so easy in netlogo to make 4 or 5 layers of nested loops without even realizing it, and this can really slow the program down. are you sure you've completely optimized your program?

Does calling FastMM4 LogAllocatedBlocksToFile() periodically use up memory space?

I'm hunting an elusive memory problem in a Delphi 5 program, where memory gets randomly overwritten at the customer site. After trying a lot of things with no result so far I now want to use the FastMM4 output from the LogAllocatedBlocksToFile() to find out which objects are allocated immediately before the overwritten area. The program uses a timer to write allocated block information to a new file every 30 minutes. Unfortunately my test run of the program (DEBUG build) crashed after about 23 hours with an EOutOfMemory exception, using allocated memory of 1.83 GB according to MadExcept.
From SysInternals Process Explorer it does look like each call of LogAllocatedBlocksToFile() allocates but does not free memory:
The red spikes in the CPU Usage graph are the LogAllocatedBlocksToFile() calls. I have added calls to LogMemoryManagerStateToFile() immediately before and after, and the data for the last spike (increse of the private bytes from about 183 MB to about 218 MB) looks like this:
55054K Allocated
47911K Overhead
53% Efficiency
and this:
55055K Allocated
47910K Overhead
53% Efficiency
so FastMM4 seems not to be aware of the additional memory the program consumes according to Process Explorer.
I'm using version 4.991 of FastMM4, downloaded today from SourceForge. The test program runs in DEBUG mode, with the following defines set:
FullDebugMode
UseCustomFixedSizeMoveRoutines
UseCustomVariableSizeMoveRoutines
NoDebugInfo
ASMVersion
DetectMMOperationsAfterUninstall
RawStackTraces
LogErrorsToFile
LogMemoryLeakDetailToFile
AlwaysAllocateTopDown
SuppressFreeMemErrorsInsideException
EnableMemoryLeakReporting
HideExpectedLeaksRegisteredByPointer
RequireDebuggerPresenceForLeakReporting
EnableMMX
ForceMMX
EnableBackwardCompatibleMMSharing
UseOutputDebugString
Questions:
Is there any known problem with those functions? Am I not using them properly, are they not intended to be called multiple times in one debugging session? Is there a way to get that memory released again?
Short version:
I have tracked this down to be a version mismatch of the support library FastMM_FullDebugMode.dll.
An older version of the library works with the newer version compiled into the executable. There seems to be no check that versions do match. However, modules don't really work together at run-time.
Long version:
The project originally uses the older version 4.97 of FastMM4, which I have checked in here together with the support library (file version 1.44.0.4, product version 1.42).
While trying to find the bug in the program I have upgraded FastMM4 to version 4.991. I also remember to have copied the new support library (file version 1.61.0.6, product version 1.60) to the build directory. However, some time later I must have deleted it from the directory, or I copied it into the wrong directory to begin with, because two hours ago I checked the modules loaded by the application and found that the app had picked up the old version of the support library from another directory, as it was not in the build directory.
Since copying it there and restarting the app the problem seems to be gone. Memory usage doesn't increase when LogAllocatedBlocksToFile() is called.
Maybe this helps someone, so I answer this instead of deleting the question.
On with debugging...

related to out of memory in netbeans java

I am using Netbeans Ide and doing project related to Natural Language Processing.When Iam running my project it is showing error "out of memory".My training data(input file) size is 34 MB.I increased by heap size in netbeans.conf and project->properties->run VM arguments to 1024M.But it is showing same error.My RAM size is 1GB.I tried by setting vm arguments size differently like 1024m,768m etc....but not worked.
In my project JNI code is used.From java programs C functions are called.Please give suggestion how to solve this problem....
Netbeans comes with a profiler that can help you find memory leaks in your application. Here is an article about how to use it. http://netbeans.org/kb/articles/nb-profiler-uncoveringleaks_pt1.html

Is there a way to limit the amount of RAM that Dart Editor uses up?

I found it was using 600 MB of RAM, even more than Visual Studio (which I shut down when it gets to 400 MB of RAM).
The dart editor is based on Eclipse which is in turn based on Java. You can tell java to limit the amount of memory an application can use on start-up in the init file.
In the DartEditor.ini file you can set the maximum memory size to use. Here 1400 Mo
-Xmx1400m
This is a command line option to java.
More info on java command line options can be found here: http://docs.oracle.com/javase/7/docs/technotes/tools/windows/java.html#options
or the java man pages.

Resources