memory

[C++] Why doesn't delete destroy anything ?

I'm playing a little with memory dynamic allocation, but I don't get a point. When allocating some memory with the new statement, I'm supposed to be able to destroy the memory the pointer points to using delete. But when I try, this delete command doesn't seem to work since the space the pointer is pointing at doesn't seem to have been ...

.NET. Minimize memory usage / optimize class design

I have the next class which instantiated about 40 million times and all its instances take about 80% of all process memory (more than 15GB). class MyClass { String Field1 String Field2 String Field3 int Field4 int Field5 float Field6 SomeEnum Field7 Boolean Field8 Boolean Field9 Boolean Field10 ...

Prevent memory overflow

At some point in my php script that makes use of curl, the following error shows up: "Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 77824 bytes) in"... It points out this part of the script: "$s = curl_exec($c);" What is the problem? And how to settle it down? ...

iPad, any way to clear extra memory before running app?

I am creating apps for the Ipad and its driving me crazy. The memory that is usable by the apps changes depending on what other apps were ran before it. There is no reliable set amount of memory that can be used by your app. i.e. If safari is ran then even after it closes it takes up some amount of memory which effects other apps. Doe...

In C++, any general guidelines for handling memory allocation/deletion?

Probably all that I'm asking for is a link to a website that I have yet to find. But coming from a Java background, what are the general guidelines for handling memory allocation and deletion in C++? I feel like I may be adding all sorts of memory leaks to my application. I realize that there are several variants of smart pointers, an...

Memory not released by python cherrypy application on linux

I have a long running process that will fetch 100k rows from the db genrate a web page and then release all the small objets (list, tuples and dicts). On windows, after each request the memory is freed. Howerver, on linux, the memory of the server keeps growing. The following posts describes what the problem is and one possible solution...

Reading in 738627 records via flat file gives memory exhaustion error

I am trying to read in a simple flat file, it has 738,627 records in it, a sample of the file looks like this: #export_dategenre_idapplication_idis_primary #primaryKey:genre_idapplication_id #dbTypes:BIGINTINTEGERINTEGERBOOLEAN #exportMode:FULL 127667880285760002817317350 127667880285760002818261461 127667880285760002825372301 127667880...

position contents of array.array into heap

I have a simple byte array I've filled with a x86 -program. Which I need to execute at runtime. """ Produces a simple callable procedure which returns a constant. """ from array import array simple = array('B') # mov rax, 0x10 simple.extend((0x81, 0xc0, 0x10, 0x0, 0x0, 0x0)) # ret simple.append(0xc3) Now, to get this running, I'...

Make a BufferedImage use less RAM?

I have java program that reads a jpegfile from the harddrive and uses it as the background image for various other things. The image itself is stored in a BufferImage object like so: BufferedImage background background = ImageIO.read(file) This works great - the problem is that the BufferedImage object itself is enormous. For exampl...

Monitoring application/tracking memory

Hi , I would like to "listen" an application on windows. When i say "listen" i mean that i have an application and i want to monitor some data displayed in it ( so it could be about monitoring the memory of my process and just reading some adress ( similar to what game wizard used to do ). Any other idea is welcome Thx ...

iPhone/iPad - help freeing up a little memory...

Hi - I am having a problem with memory I cant get straightened out. What I am doing is this: I have a viewcontroller that looks similar to a book with 7 different tabs. Each time the user presses a tab, the content on the "page" changes and the background image changes to reflect the different tab selected. Each background image is 768...

Does declaring a variable as "private" in C# protect the memory in windows from being accessed by a memory scanner?

My workmate always tells me that if we declare anything as "public" then it is dangerous because then any program can access that memory and that the solution is to use the "private" access modifier. I am wondering if this is infact true. ...

C#: How to get the size of available system memory?

Is it possible to get the size of system available memory in C#.NET? if yes how? ...

C++ - Memory issues with two dimensional array

Hi guys, Following this nice example I found, I was trying to create a function that dynamically generates a 2D grid (two dimensional array) of int values in C++. It works fairly well the first couple of times you change the values but if crashes after that. I guess the part where memory is freed doesn't work as it should. Any ideas w...

Matlab: Free memory is lost after calling a function

Hey, I have some troubles with memory management in Matlab. Finally it leads to not enough free memory and an error.I tried to pinpoint the problem and found one interesting "feature": Somehow I loose free Memory in Matlab. I do the following: 1) Start Matlab 2) typing "memory" I get: Maximum possible array: 1293 mb, Memory available ...

C# import excel to Datatable

When passing a local path to an XLS to import to a datable, the system is giving an error where it is looking for the c:\ on the server rather than on the local machine. How can I import an XLS directly to a datable. ...

Why can NAND flash memory cells only be directly written to when they are empty?

I'm trying to understand why you have to erase cells before writing to them with respect to SSDs and how they slow down over time. ...

How to modify memory contents using GDB?

I know that we can use several commands to access and read memory: for example, print, p, x... But how can I change the contents of memory at any specific location (while debugging in GDB)? Thanks for any info. ...

Static memory in python: do loops create new instances of variables in memory?

I've been running Python scripts that make several calls to some functions, say F1(x) and F2(x), that look a bit like this: x = LoadData() for j in range(N): y = F1(x[j]) z[j] = F2(y) del y SaveData(z) Performance is a lot faster if I keep the "del y" line. But I don't understand why this is true. If I don't use "del y"...

Asp.net memory issue while file uploading

Hi, I have two asp.net pages. In the first page i have a fileupload control and a submit button. In the submit button click event a file will be posted to second page. The second page receives the file using request.files method. My problem is when i upload a huge file, IIS is using the memory while receiving the file. But it is not cle...