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.
0
votes
1answer
76 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 ...
8
votes
1answer
345 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 ...
3
votes
2answers
183 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 ...
4
votes
1answer
297 views
Does having more classes necessarily increase the memory requirements of the app?
When we add .edmx files to a DLL, the physical size of the DLL increases. DLL's are loaded into memory. However, the .NET infrastructure with functionality such as JIT compilation and the GAC ...
9
votes
2answers
381 views
Haskell memory efficiency - which is the better approach?
We are implementing a matrix compression library based on a modified two dimensional grammar syntax. Now we have two approaches for our data types -which one will be better in case of memory usage? ...
3
votes
2answers
212 views
How are the size of the stack and heap limited by the OS?
Note: if you need to consider a specific OS to be able to answer, please consider Linux.
Whenever I run a program, it will be given a virtual memory space to run in, with an area for its stack and ...
2
votes
2answers
159 views
Flat addressing vs. segmented addressing
Is flat addressing model generally superior to a segmented one? If so, why? If not, what instances would call for each over the other and why?
My understanding of memory models surrounds the ...
2
votes
2answers
190 views
What is the best solution for static memory allocation?
I'm working on image processing and I need to use big Images in a critical system.
A good practice for critical systems is to avoid dynamic allocation of memory but what is the design/recommendations ...
1
vote
1answer
108 views
Improving the efficiency of containers with dynamically allocated objects
This is not strictly related to C++ but its type system serves to illustrate the problem well.
Assume:
We have a generic template Container<T> (such as a std::vector<T>) which stores an ...
5
votes
5answers
318 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
0answers
52 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
125 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 ...
7
votes
2answers
221 views
Is there a comparative study of the memory consumption of programming languages runtimes, correlated with expressiveness and production bug ratios?
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 ...
19
votes
5answers
1k 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 ...
0
votes
0answers
37 views
Object pooling in managed environments
My application tries to process chunks of data, each sized at tens of megabytes, but not fixed size.
I use a producer for data fetching, and consumer for data processing,
Since I do not control the ...
21
votes
1answer
494 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
231 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
387 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
231 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 ...
4
votes
2answers
976 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, ...
2
votes
3answers
554 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 ...
0
votes
3answers
153 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
166 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 ...
7
votes
1answer
284 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
270 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
434 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
448 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
755 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 ...
4
votes
2answers
625 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
150 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?
15
votes
4answers
2k 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
203 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 ...
1
vote
3answers
638 views
How do you directly touch video memory, or write to video memory, or for a display directly?
I want to know if there's any documentation, tutorials, or anything really that can help me better grasp the idea of how this is done from the hardware level directly(not just RAMDAC and analog ...
7
votes
3answers
539 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
212 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
143 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
266 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
108 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
567 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
585 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
303 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 ...
-4
votes
4answers
170 views
Easiest way of remembering comparision operators? [closed]
After coding for several years in multiple languages, I still mix up the meaning of basic comparison operators:
<, <=, >, >=
I mean, it's absolutely silly. I do recursive functions ...
2
votes
4answers
150 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); ...
2
votes
4answers
1k views
Serializing Data Structures in C
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
288 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
153 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
75 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 ...
5
votes
6answers
636 views
Memory Management/Embedded Management in C [closed]
Im wondering if there is a set or a few good books/Tutorials/Etc.. that go into Memory Management/Allocation Specifically (or at least have a good dedicated section to it) when it comes to C. This is ...
3
votes
1answer
923 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 ...
14
votes
6answers
695 views
Term for 24-bits
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, ...