ram

Configure .NET CLR RAM usage

匆匆过客 提交于 2019-12-01 09:18:13
问题 Is there a method of configuring the .NET CLR RAM usage on my machine? Suppose I have 64GB of RAM and I want to limit it to 4GB? It this possible? Edit - The root of the problem is that I have a 64-bit application that runs fine on a 64bit - 4GB machine but when run on a 64bit - 64GB machine it fails (stops dead in it's tracks when allocating memory). I'm thinking memory fragmentation is the cause as the application attempts to allocate up to 8GB chunks if there is enough RAM available

Why does a dictionary use so much RAM in Python

时间秒杀一切 提交于 2019-12-01 06:30:24
I have written a python script that read the contents of two files, the first is a relatively small file (~30KB) and the second is a larger file ~270MB. The contents of both files are loaded into a dictionary data structure. When the second file is loaded I would have expected the amount of RAM required to be roughly equivalent to the size of the file on disk, perhaps with some overhead, but watching the RAM usage on my PC it seems to consistently take ~2GB (around 8 times the size of the file). The relevant source code is below (pauses inserted just so I can see the RAM usage at each stage).

Why does a dictionary use so much RAM in Python

我是研究僧i 提交于 2019-12-01 05:12:16
问题 I have written a python script that read the contents of two files, the first is a relatively small file (~30KB) and the second is a larger file ~270MB. The contents of both files are loaded into a dictionary data structure. When the second file is loaded I would have expected the amount of RAM required to be roughly equivalent to the size of the file on disk, perhaps with some overhead, but watching the RAM usage on my PC it seems to consistently take ~2GB (around 8 times the size of the

What is StringBuilder's RAM consumption like?

点点圈 提交于 2019-12-01 04:48:30
We have a few operations where we are doing a large number of large string concatenations, and have recently encountered an out of memory exception. Unfortunately, debugging the code is not an option, as this is occurring at a customer site. So, before looking into a overhaul of our code, I would like to ask: what is the RAM consumption characteristics of StringBuilder for large strings? Especially as they compare to the standard string type. The size of the strings are well over 10 MB, and we seem to run into the issues around 20 MB. NOTE : This is not about speed but RAM. Here is a nice

What is StringBuilder's RAM consumption like?

橙三吉。 提交于 2019-12-01 02:42:19
问题 We have a few operations where we are doing a large number of large string concatenations, and have recently encountered an out of memory exception. Unfortunately, debugging the code is not an option, as this is occurring at a customer site. So, before looking into a overhaul of our code, I would like to ask: what is the RAM consumption characteristics of StringBuilder for large strings? Especially as they compare to the standard string type. The size of the strings are well over 10 MB, and

Read file in chunks - RAM-usage, read Strings from binary files

此生再无相见时 提交于 2019-11-30 19:08:18
i'd like to understand the difference in RAM-usage of this methods when reading a large file in python. Version 1, found here on stackoverflow: def read_in_chunks(file_object, chunk_size=1024): while True: data = file_object.read(chunk_size) if not data: break yield data f = open(file, 'rb') for piece in read_in_chunks(f): process_data(piece) f.close() Version 2, i used this before i found the code above: f = open(file, 'rb') while True: piece = f.read(1024) process_data(piece) f.close() The file is read partially in both versions. And the current piece could be processed. In the second

How do I execute a function from RAM on a Cortex-M3 (STM32)?

非 Y 不嫁゛ 提交于 2019-11-30 15:15:20
问题 I'm trying to execute a function from RAM on a Cortex-M3 processor (STM32). The function erases the and rewrites the internal flash, so i definitely needs to be in RAM but how do I do that? What I have tried is this: Copy the function to a byte array in RAM using memcpy (checking that it gets aligned correctly), setting a function pointer to point to the byte array an then calling the the function(pointer). This works fine for maybe 10 instructions (I can follow the execution with the

How do I execute a function from RAM on a Cortex-M3 (STM32)?

浪尽此生 提交于 2019-11-30 13:53:20
I'm trying to execute a function from RAM on a Cortex-M3 processor (STM32). The function erases the and rewrites the internal flash, so i definitely needs to be in RAM but how do I do that? What I have tried is this: Copy the function to a byte array in RAM using memcpy (checking that it gets aligned correctly), setting a function pointer to point to the byte array an then calling the the function(pointer). This works fine for maybe 10 instructions (I can follow the execution with the debugger) but then I get a buss error and the processor resets. The buss error occurs on the second pass

R reading a huge csv

不打扰是莪最后的温柔 提交于 2019-11-30 11:47:01
问题 I have a huge csv file. Its size is around 9 gb. I have 16 gb of ram. I followed the advises from the page and implemented them below. If you get the error that R cannot allocate a vector of length x, close out of R and add the following line to the ``Target'' field: --max-vsize=500M Still I am getting the error and warnings below. How should I read the file of 9 gb into my R? I have R 64 bit 3.3.1 and I am running below command in the rstudio 0.99.903. I have windows server 2012 r2 standard,

How to reduce Spring memory footprint

送分小仙女□ 提交于 2019-11-30 11:08:36
问题 I would like to ask you HOW (or IF) is possible to reduce Spring framework's RAM footprint. I created a simple helloworld app for demonstrating the issue. There are only two classes and context.xml file: Main - class with main method Test - class used for simulating some "work" (printig Hello in endless loop) context.xml contains only this: <context:component-scan base-package="mypackage" /> Test class contains only metod called init , called after construction: @Component public class Test{