Memory refers to the physical devices used to store programs or data on a temporary or permanent basis for use in a computer or other digital electronic device.

learn more… | top users | synonyms

0
votes
1answer
24 views

What effect does using multiple childViewControllers views inside a ContainerViewController have on memory?

I have three childViewController views inside my ContainerViewController and these three views are inside a horizontal scroll view. My intention is to build an app that has a custom camera on one ...
2
votes
6answers
394 views

What are memory addresses? [closed]

I have more or less 0 knowledge in low-level topics, so forgive my possible ignorance. I know that in languages such as C, pointers hold 'memory addresses', i.e. strings (or binary data?) written in ...
-1
votes
2answers
85 views

Loading database in memory vs querying

I am currently developing a continuous backup software. The key feature of the software is instant backup meaning that each time a file is created, modified, renamed or deleted the change is ...
-4
votes
0answers
43 views

Allocating memory inside a function and returning it back [migrated]

I want to pass a pointer to my function and allocate the memory to which this pointer points. I've read in other posts that I should pass a double pointer to this function and I did so, but I keep ...
-2
votes
2answers
131 views

Estimation of space is required to store 275305224 of 5x5 MagicSquares? [closed]

Here are some examples of 5x5 Magic Squares found by the Magic Square Generator by Marcel Roos: Magic squares 5x5 Sum must be: 65 Solution: 1 1 2 13 24 25 3 23 17 6 16 20 21 11 8 ...
12
votes
3answers
540 views

Debugging memory corruption

First off, I do realize this is not a perfect q&a style question with an absolute answer, but I can't think of any wording to make it work better. I don't think there is an absolute solution to ...
4
votes
1answer
271 views

What are the benefits of Android way of “saving memory” - explicitly passing Context objects everywhere?

Turned out, this question is not easy to formulate for me, but let's try. In Android, pretty much any UI object depends on a Context, and has defined lifetime. Android can also destroy and recreate UI ...
0
votes
0answers
65 views

Memory management scheme for custom memory allocator

I am in the process of implementing a small memory manager. The users of this memory pool will always access the memory bytes via handles. So a memory allocation/deallocation is done with two APIs: ...
3
votes
1answer
371 views

Why do programmers still use “SAFE_DELETE”? [closed]

If I had a dime for every time I've seen this macro in use, today I would be coding just for fun: #define SAFE_DELETE(p) if ((p) != NULL) { delete (p); (p) = NULL; } Why do programmers insist in ...
1
vote
1answer
81 views

In general: guard pages or heap checks? [closed]

I would like to know the advantages and disadvantages of using guard pages with bump-pointer allocation versus heap checks with bump-pointer allocation, including performance as a consideration. In a ...
4
votes
3answers
428 views

Multiple sites with the same codebase in Python

I am trying to run a large amount of sites which share about 90% of their code. They are simply designed to query an API and return the results. They will have a common userbase / database but will be ...
0
votes
2answers
144 views

Failed to allocate memory - What is it trying to say?

In my early days of programming I often used to get memory related fatal errors in the following format: Fatal error: Allowed memory size of <some big number> bytes exhausted (tried to ...
2
votes
4answers
368 views

In C++ Good reasons for NOT using symmetrical memory management (i.e. new and delete)

I try to learn C++ and programming in general. Currently I am studying open source with help of UML. Learning is my hobby and great one too. My understanding of memory allocation in C++ is that it ...
6
votes
6answers
600 views

Demonstration of garbage collection being faster than manual memory management

I've read in many places (heck, I've even written so myself) that garbage collection could (theoretically) be faster than manual memory management. However, showing is a lot harder to come by than ...
1
vote
1answer
197 views

Are there theoretical reasons why arrays in C take less RAM than Java?

My experience is that Java requires about twice as much RAM compared to C (comparing char arrays or other comparisons). I also read in a hardware book that Java takes about twice RAM than C. Is is ...
4
votes
1answer
285 views

Writing a spell checker similar to “did you mean”

I'm hoping to write a spellchecker for search queries in a web application - not unlike Google's "Did you mean?" The algorithm will be loosely based on this: http://catalog.ldc.upenn.edu/LDC2006T13 ...
14
votes
5answers
11k views

Why does IIS default to Recycling the Application Pool every 1740 minutes?

Why does IIS default to recycle the app pool after a given time? Is there some specific reason other than perhaps most web apps are not managing the memory prudently? Given that you are managing your ...
0
votes
3answers
163 views

How are negative signed values stored? [duplicate]

I was watching this video on the maximum and minimum values of signed integers. Take an example of a positive signed value - 0000 0001 The first bit denotes that the number is positive and the last ...
7
votes
3answers
353 views

Object Identity and Mutability

I was reading a proposal for value types in Java, and I came across this sentence: "Object identity serves only to support mutability, where an object’s state can be mutated but remains the same ...
0
votes
3answers
286 views

Why std::allocators are not that popular? [closed]

With the latest trends about C and C++ applications, and with latest I mean the latest years, I was expecting to see std::allocators to be used way more frequently than what it really is. Modern ...
1
vote
1answer
136 views

How to implement an algorithm out-of-core?

I want to implement a parallel clustering algorithm "out-of-core" in CUDA. My CPU has 12GB of RAM and GPU has 4GB of it. What I want is that the entire dataset should be on the disk, and I can pick ...
5
votes
1answer
162 views

At ping, why do we have to do array copying instead of passing on the source array that the client sent to us?

So I have been googling about this OpenSSL heart-bleed thing and somehow sees that it is caused by the heartbeat extension which requires client to ping the server to show its aliveness and it all ...
3
votes
2answers
186 views

How to manage memory in C interface for C++ implementation considering c++11?

I have a library implemented in C++ which has a C interface. This C interface is, for all intents and purposes, the only way to use this library. C++11 seems to discourage the use of raw pointers but ...
0
votes
1answer
102 views

Worried about memory leak in DLL that creates a dynamic sized array

I have a wrapper DLL that interfaces to another DLL that contains the following function: char * Foobar(void) { // BLAH is the function from the DLL this wrapper interfaces too char *array ...
5
votes
2answers
208 views

Evaluation order of expressions in Clojure?

I'm currently learning Clojure (my first functional programming language), and I'm curious as to its order of evaluation. Here is an example: (take 10 (cycle [1 2 3])) If the cycle expression was ...
0
votes
0answers
61 views

streaming data in memory aggregation

We have a stream of data we're aggregating stats over and putting into a python dictionary (sent from kafka). Every X time interval, We update our database with these aggregated metrics. This ...
0
votes
2answers
80 views

Multi-level paging tables

Referring to the image here: From http://en.wikipedia.org/wiki/File:X86_Paging_4K.svg Could somebody please explain something for me? I don't get exactly how this works. As I understand it the ...
38
votes
5answers
6k views

Why is CPU cache memory so fast?

What makes CPU cache memory so much faster than main memory? I can see some benefit in a tiered cache system. It makes sense that a smaller cache is faster to search. But there must be more to it.
2
votes
4answers
466 views

Why do we use to talk about addresses and memory of variable in C?

Why do we use to talk about addresses and memory of variable in C, where in other languages (like in Java, .Net etc) we do not talk about variable address and memory in a program, we will directly use ...
25
votes
1answer
603 views

Performance of single-assignment ADT oriented code on modern CPUs

Working in immutable data with single assignments has the obvious effect of requiring more memory, one would presume, because you're constantly creating new values (though compilers under the covers ...
10
votes
4answers
7k views

How can I monitor the JVM memory in a proper way?

I'm thinking of how we do JVM memory monitor in a low overhead way in production environment even under busy hour. Suppose I have two tomcat app server in production, load balance set up behind them. ...
-1
votes
1answer
115 views

How do memory-clean apps work? [closed]

In terms of operating system architecture, what does a memory-clean software to get rid of all data that fill the virtual memory? I assume that it simply saves all RAM data into a file, but how does ...
0
votes
3answers
158 views

Advantage of monitoring file change using Windows API rather than manually

I developed a Windows software about an year ago. Part of it was to monitor few configuration files for manual changes by user and if any of these change restart a particular service. So, I used the ...
1
vote
1answer
1k views

how much memory should android app use [closed]

We are planning to develop an android application. the application will use API and data transfer will be via SSL. I should write documentation and set functional and system requirements for the ...
5
votes
2answers
333 views

Are there alternatives to stack+heap+static memory model?

All programs I have seen organize their data memory into one or more call stacks (usually fixed size, but sometimes not), the heap, and static memory. Lately thread-local static storage has been ...
35
votes
7answers
3k views

In C++, how much programmer time is spent doing memory management

People who are used to garbage collected languages are often scared of C++'s memory management. There are tools, like auto_ptr and shared_ptr which will handle many of the memory management tasks for ...
11
votes
11answers
1k views

Could it be more efficient for systems in general to do away with Stacks and just use Heap for memory management?

It seems to me that everything that can be done with a stack can be done with the heap, but not everything that can be done with the heap can be done with the stack. Is that correct? Then for ...
7
votes
4answers
639 views

Why not free memory as soon as its reference counter hits zero [duplicate]

A lot of languages like Java and C# have garbage collectors that free memory when that memory no longer has any reference. Yet they don't immediately free it after the reference counter hits zero but ...
2
votes
2answers
477 views

Help me think in C++

I mainly use dynamic languages. For many years I see statically typed hello world examples like const int STACK_SIZE = 100; And I will think "wow, I can't think like that". I understand memory ...
2
votes
1answer
297 views

How does the CPU know when it received RAM data and instructions?

Well, the title is pretty much self explanatory, but I'll expound it a bit, and say the origin of my question. So, I've been wondering as to how the CPU knows when it received the RAM. I'm pretty ...
0
votes
1answer
109 views

Multiple Instantiate of 1 class affects memory?

I am currently struggling with memory handling. I have an if statement and each case instantiate a new object from a class. Does this affect the memory allocation in java? switch() { case 1: test t1 ...
0
votes
2answers
2k views

Can anyone explain representation of float in memory?

This is not duplicate question as I read the previous question. Can anyone help me in understanding how float values are stored in the memory . My doubt is here float values contain '.' (for example ...
-1
votes
2answers
86 views

Applications affected by memory performance [closed]

I'm writing a paper on the topic of applications affected more by memory performance than processor performance. I've got a lot written regarding the gap between the two, however I can't seem to find ...
1
vote
6answers
4k views

Serializing Data Structures in C [closed]

I've recently read three separate books on algorithms and data structures, tcp/ip socket programming, and programming with memory. The book about memory briefly discussed the topic of serializing data ...
12
votes
1answer
618 views

How important it is to fix memory leaks?

I found by Valgring that some GTK+ programs leaks memory. How important it is to fix those leaks? I mean, often those programs works very well but on the other hand, one can never be sure if one wants ...
2
votes
1answer
118 views

Handling Dynamic amount of Strings for persistent and runtime storage in an IOS App

Background I am dynamically building an FQL query statement and because of the nature of the app, I exclude FB family members, this is the base portion of the query and remains fairly static. The ...
12
votes
3answers
4k views

What are CPU registers?

This question has been bothering me for some time now and today I figured I would Google it. I've read some stuff about it and it seemed very similar to what I've always known as processor cache. Is ...
1
vote
1answer
2k views

External sqlite db file from sdcard in android

I just searched for the same but didn't get the answers. What I have is a db file which is around 100MB. I have saved the db file in sdcard . Through this db file I'm going to populate the contents ...
0
votes
1answer
171 views

Will having ClassA extend ClassB slow down my runtime performance compared to having classC which contains all the members of ClassC?

I have a class with a lot of methods. I would like to group similar methods together in their own class, but all of the methods need to extend another class, ClassC. So I was thinking of having ...
3
votes
2answers
386 views

Methods to identify and resolve memory leaks in the JVM

As the data is migrated via the object level, there has been a slow upwards trend in memory usage. I can see the periodic gc activity, but the memory trend is still going up slowly. I have currently ...