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

6
votes
6answers
634 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 ...
2
votes
1answer
120 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 ...
2
votes
1answer
139 views

Is every object rounded to the same size in Java?

According to this answer every object in Java is of the same size? Is the answer talking about the object itself or the reference to the object? Here's the statement: every object size is rounded ...
8
votes
2answers
411 views

Is there a comparative study of the memory consumption of programming languages runtimes, correlated with expressiveness and production bug ratios? [closed]

There are many comparative studies and available online when it comes to the runtime performance of applications built using one language or another. Some driven by corporations, some academic, some ...
20
votes
5answers
2k views

How did they debug segmentation faults before protected memory?

Now, when I make a programming mistake with pointers in C, I get a nice segmentation fault, my program crashes and the debugger can even tell me where it went wrong. How did they do that in the time ...
25
votes
1answer
613 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 ...
2
votes
4answers
292 views

Architecture change from using disk to RAM to read and write key/value pairs coming over a network

A WebApp writes a stream of data coming over a network to disk as key/value pair and then reads & send it over network again after few milliseconds in 99% of case. In 1% of cases write/read can be ...
2
votes
2answers
841 views

How many `malloc` calls is too many? If any?

I'm implementing a system in C, implemented partially as a library. The library does most of the memory management itself, with the application layer just having to call *_destroy functions on the ...
2
votes
4answers
251 views

Should I read a chapter about Memory management if now a days we mostly use ARC?

I'm reading a book on Objective C, and I was wondering about 2 things: Should I take the time currently to read a whole chapter on memory management? If you are doing a really good job on manual ...
6
votes
2answers
5k views

Java vs PHP Memory / CPU Consumption

I work in a PHP based company. There is a project where we want to create a backend service. Senior members here are going for PHP, even though it is slower than Java. Their only point of contention, ...
4
votes
3answers
2k views

Methods to share memory or state across JVMs?

This is long question I know. I have a few options for what I want. I don't want to know "this is obviously the best," but maybe any pros or cons I may be missing about the options, as well as any ...
1
vote
3answers
173 views

Please help me understand the relationship between script file size and memory usage?

I am programming in PHP and I have an include file that I have to, well, include, as part of my script. The include file is 400 MB, and it contains an array of objects which are nothing more than ...
2
votes
6answers
227 views

Deterministic and controllable fully automated memory management

Fully automated memory management increases productivity and integrity greatly, but usual implementation (GC) has a critical problem. It's non-deterministic, and not controllable. This causes many ...
8
votes
1answer
343 views

Why is the main memory for object allocation called the 'heap'?

Has anybody got an idea why the area of main memory where objects are allocated is referred to as the heap. I can understand the rationale for that of the stack LIFO but would like to know what the ...
3
votes
2answers
358 views

Purpose of Base Address?

What's the purpose of a base address in an executable? For example, in Microsoft Visual C++'s linker, you can set a base address, or use the default of 0x1000000. But with virtual memory, why would a ...
3
votes
5answers
586 views

Given that I voluntarily choose not to implement virtual memory in my kernel, how would the memory-management-unit work?

For my basic kernel I refuse to implement the dreaded confusion of virtual memory scheming, so I want only real memory addresses for everything. Some people have argued with me that since virtual ...
4
votes
5answers
753 views

Java memory management (thunks/lazyness)

If I want to create an infinite list of integers in Java like so: ArrayList<Integer> list = new ArrayList<Integer>(); for(int i = 0;;i++){ list.add(i); } I run out of memory. My ...
2
votes
2answers
2k views

Can multiple CPU's / cores access the same RAM simutaneously?

This is what I guess would happen: If two cores tried to access the same address in RAM, one would have to wait for the other to access the RAM. The second time that each core would try to access ...
5
votes
2answers
2k views

What are the pros and cons of Inter process communication done via sockets vs shared memory?

I understand that two of the many more options for inter process communication can be : Shared memory Sockets Actually I saw these two options being exposed by Intellij Idea for debugging a Java ...
2
votes
2answers
180 views

Possible to implement OOP without using extensive heap operations?

Is the concept of OOP intimately tied to allocating objects on the heap? Is it possible to write normal OOP without creating excessive objects on the heap?
16
votes
4answers
3k views

Is it possible to read memory from another program by allocating all the empty space on a system?

Theoretically, if I were to build a program that allocated all the unused memory on a system, and continued to request more and more memory as other applications released memory that they no longer ...
-1
votes
3answers
245 views

How flexible can hardware get? [closed]

This subject is long time in the making for me and it particularly took off when I was researching bootloaders for computers and consumer electronics, which, I will note, differ drastically. I've ...
7
votes
3answers
566 views

Why isn't DSM for unstructured memory done today?

Edit: Comments suggested, that DSM just faded out by being not used recently. What were the reasons for this, what are DSMs drawbacks? Literature lists many positive aspects like easy to port ...
0
votes
3answers
1k views

Instruction vs data cache usage

Say I've got a cache memory where instruction and data have different cache memories ("Harvard architecture"). Which cache, instruction or data, is used most often? I mean "most often" as in time, not ...
2
votes
2answers
161 views

Browser support for internal corporate tools

We are on the verge of a conversion. For years, our company supported only IE for its internal (intranet) home-built tools. Since a few of our users are still on XP, which means IE only goes up to ...
0
votes
1answer
374 views

Increase the size of a memory mapped file

I am maintaning a memory mapped file to store my tree like datastructure. When I'm updating the datastructure ,I got this problem. The file is limited on it's size and can't be too long or too small. ...
0
votes
0answers
137 views

Where are the Interface information stored?

I would like to know whether the information in an interface such as the variables which are final and the methods which are abstract and static would all live in method area ??? And what would be ...
5
votes
3answers
785 views

Tension between the dependency inversion principle and avoiding “new” in C++?

I have seen a lot of advice that it is better to do Type object; than Type* object = new Type(); in C++ whenever possible—i.e., minimize your use of new. I understand the rational behind this and ...
-2
votes
4answers
899 views

C simple arrays and pointers question

So here's the confusion, let's say I declare an array of characters char name[3] = "Sam"; and then I declare another array but this time using pointers char * name = "Sam"; What's the ...
5
votes
3answers
1k views

How would one go about reading memory from a process? Is it different by OS?

As an experienced web-developer, but a novice "low level" programmer, this stuff is sort of voodoo to me still. I'm curious about how one would even begin to go about finding a memory block, and then ...
2
votes
4answers
217 views

How to initialize object which may be used in catch clause?

I've seen this sort of pattern in code before: //pseudo C# code var exInfo = null; //Line A try { var p = SomeProperty; //Line B exInfo = new ExceptionMessage("The property was " + p); ...
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 ...
-3
votes
3answers
302 views

In what practical ways is it good to remember the memory/pointers model? [closed]

A variable refers to a value. A variable is also stored in a memory address. People say that it's good to have this memory model in mind. Is that true? What is some sample code that shows this as ...
3
votes
1answer
218 views

Concept of Address Space

I have searched the idea of address space that is The set of all legal addresses in memory for a given application. The address space represents the amount of memory available to a program. I am ...
1
vote
2answers
80 views

Evaluating mean and std as simulations are added

I have simulations that evaluate a certain value X. I run the simulations several times and save the value of X in a vector V. When all the runs have finished I evaluate the mean and standard ...
4
votes
1answer
2k views

Why the overhead when allocating objects/arrays in Java?

How many bytes an array occupies in Java? Assume It's a 64bit machine and also assume there are N elements in an array, so all these elements would take up 2*N, 4*N or 8*N bytes for different types of ...
12
votes
6answers
790 views

Term for 24-bits [closed]

Is there a term for a 24-bit (3-byte) integer? I know uncommon bit counts (such as a "nibble" or "nybble" for 4 bits) have names, and having 24-bits in both video and audio technology, for instance, ...
9
votes
4answers
2k views

Analyzing Memory Usage: Java vs C++ Negligible?

How does the memory usage of an integer object written in Java compare\contrast with the memory usage of a integer object written in C++? Is the difference negligible? No difference? A big difference? ...
2
votes
1answer
505 views

How are new[] and malloc implemented in Windows?

So when you call malloc or new [] from your C/C++ application, how does the CRT translate it into Windows API calls?
3
votes
4answers
704 views

strategies to keep tabs of memory leaks in non memory-managed languages

When it comes to non memory managed languages such as C, C++ or Fortran (my case), it becomes increasingly difficult to keep track of memory allocation/deallocation, especially when ownership must be ...
1
vote
1answer
334 views

GDI low on memory

I am fresh to Visual C++. While moving forward in the book "Programming Windows with MFC", I came across GDI (Graphics Device Interface) and use of paint brush. The book says a brush cannot be created ...
2
votes
2answers
610 views

Windows Physical Direct Memory Mapping

I'm a bit disappointed there is almost no discussion of this no matter where I look so I guess I'll have to ask. I'm writing a cross platform memory bench marking application which requires direct ...
0
votes
1answer
199 views

non-volatile virtual memory for C++ containers

Is there a virtual memory management process that would allow a program to use the standard container structures and classes, but retain these structures and their data when the program is not running ...
6
votes
5answers
473 views

On mobile is there a reason why processes are often short lived and must persist their state explicitly?

Most mobile platforms (such as Android, iOS, Windows phone 7 and I believe the new WinRT) can kill inactive application processes under memory pressure. To prevent this from affecting the user ...
2
votes
1answer
216 views

List structures in memory

Could anyone give an overview of how list structures which are composed of a head and a tail which references the rest of the list i.e linked list are represented in memory of the computer? Does the ...
3
votes
3answers
935 views

Can coding style cause or influence memory fragmentation?

As the title states, I'd like to know if coding style can cause or influence memory fragmentation in a native application, specifically one written using C++. If it does, I'd like to know how. An ...
2
votes
1answer
1k views

What metrics should be used to measure memory consumption of a program for performance test?

I am asked to provide performance statistics for a program, one of them being memory consumption. I noticed that in perfmon or in .NET API there is apparently many variable related to memory usage, ...
27
votes
4answers
3k views

Where are null values stored, or are they stored at all?

I want to learn about null values or null references. For example I have a class called Apple and I created an instance of it. Apple myApple = new Apple("yummy"); // The data is stored in memory ...
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. ...
4
votes
4answers
438 views

Manual memory allocation and purity

Language like Haskell have concept of purity. In pure function, I can't mutate any state globally. Anyway Haskell fully abstracts memory management, so memory allocation is not a problem here. But if ...