My friend was asked the question below in an interview and asked for my help post-interview. The question is bugging me as well, because I have no idea. Can someone please elaborate?  Create a class to store a number limited in size only by the total amount of memory available on the system
51785
I'd like to implement a big int class in C++ as a programming exercise&mdash;a class that can handle numbers bigger than a long int.  I know that there are several open source implementations out there already, but I'd like to write my own.  I'm trying to get a feel for what the right approach is.  I understand that the general strategy is get the number as a string, and then break it up into smaller numbers (single digits for example), and place them in an array.  At this point it should be relatively simple to implement the various comparison operators.  My main concern is how I would implement things like addition and multiplication.  I'm looking for a general approach and advice as opposed to actual working code.
38936
I have a problem in showing memory in task manager with memory and paging columns. Why it shows so small size usage? And maybe anyone knows how to fix it?  Here is a screenshot(working set, memory, page pool) sorted by most consuming:
39763
I have a device that needs a block of memory that is reserved solely for it, without the OS intervening.  Is there any way to tell BIOS or the OS that a block of memory is reserved, and it must not use it?  I am using this device on an openSUSE machine.
44787
If you are creating a 1d array, you can implement it as a List, or else use the 'array' module in the standard library.  I have always used Lists for 1d arrays.  What is the reason or circumstance where I would want to use the array module instead?  Is it for performance and memory optimization, or am I missing something obvious?
59383
Is Kernel space used when Kernel is executing on the behalf of the user program i.e. System Call? Or is it the address space for all the Kernel threads (for example scheduler)?  If it is the first one, than does it mean that normal user program cannot have more than 3GB of memory (if the division is 3GB + 1GB)? Also, in that case how can kernel use High Memory, because to what virtual memory address will the pages from high memory be mapped to, as 1GB of kernel space will be logically mapped?
2957
Which is correct? Why?   Not enough memory No enough memory    seems to be significantly more popular on the Internet than the .  I want to use such construction as an error message in the program. I think it is a short version of the sentence "There is not enough memory".
67295
I remember an episode in Star Trek TNG (probably first season) where Data is describing some of his internal workings. Among them, he lists that he is equipped with "12 quadrillion" bytes for memory storage. If my math is right that is 12 petabytes.  It seems to me that is severely short for the amount of data he collects every single day.  I found this related question:    However, it seems that Data likely did not back up anything that he learned. I do remember him stating a few times that he forgets nothing.  So this is the question: Is 12 PB enough storage for an android like Data (assuming none of it is taken up by OS and programs)?     Consider some of the implications about massive amounts of data on .    Well, I just found  which says it is 800 quadrillion bits! That is quite a bit more (pun intended) but I am certain that the episode I am thinking of said 12.
98014
Our ability to store data on or in physical media continues to grow, with the maximum amount a data you can store in a given volume increasing exponentially from year to year. Storage devices continue to get smaller and their capacity gets bigger.   This can't continue forever, though, I would imagine. "Things" can only get so small; but what about information? How small can a single bit of information be?  Put another way: given a limited physical space -- say 1 cubic centimeter -- and without assuming more dimensions than we currently have access to, what is the maximum amount of information that can be stored in that space? At what point does the exponential growth of storage density come to such a conclusive and final halt that we have no reason to even attempt to increase it further?
35231
Why does my MBP sometimes report VM Size: 300+ GB in Activity Monitor under System Memory tab, when my hard disk size is only 250 GB (total) and RAM is 4GB? I know it can't magically get that extra space, but what is it trying to tell me?
65195
If I write a program that tries to read memory at every possible address, and I run it on a "full" Unix, it will not be able to access all of the physical RAM.  But how does the operating system prevent it from doing so?  I am more familiar with small CPU architectures where any piece of assembly code can access everything. I don't understand how a program (the kernel) can detect such malicious operations.
68068
How can I find out the size of a file I opened with an application written in C ?  I would like to know the size, because I want to put the content of the loaded file into a string, which I allocate using malloc(). Just writing malloc(10000*sizeof(char)); is IMHO a bad idea.
13182
I'm going to install 64 bit 14.04 on a new machine with something like 1 to maybe 128GB RAM and even more RAM later. How much space should I allocate to the swap partition?   And especially: WHY those recommendations for these numbers?    (None of the existing answers  and  explain any of the why and are a bit dated if we look at 1GB or RAM and up)
46642
Let's say I have a class that has a member called data which is a list.    I want to be able to initialize the class with, for example, a filename (which contains data to initialize the list) or with an actual list.  What's your technique for doing this?  Do you just check the type by looking at __class__?  Is there some trick I might be missing?  I'm used to C++ where overloading by argument type is easy.
93735
I would like to know how many Primary and Extended Partitions I can create on a x86_64 PC with Linux running on it?     Update  : If there is a limit to the number of partitions, why is that the limit?
13148
I have an application that reads a CSV file with piles of data rows.  I give the user a summary of the number of rows based on types of data, but I want to make sure that I don't read in too many rows of data and cause OutOfMemoryErrors.  Each row translates into an object.  Is there an easy way to find out the size of that object programmatically?  Is there a reference that defines how large primitive types and object references are for a VM?  Right now, I have code that says read up to 32,000 rows, but I'd also like to have code that says read as many rows as possible until I've used 32MB of memory.  Maybe that is a different question, but I'd still like to know.
14796
I was thinking to add some RAM to my computer as it goes slow these days, so i came to the Taskbar to see memory usage statistics but i had difficulty  guessing the real meaning of some memory management parameters. so  Q1: What exactly are Commited Memory, Cached, Paged , Not-Paged pool and how they are different with In-Use Memory.  Q2: As far as i know the kernel has a complex memory management algorithm, so if i have some free memory shown in my laptop's RAM can i conclude that my physical memory is sufficient?
105282
Using C#, I want to get the total amount of RAM that my computer has. With the PerformanceCounter I can get the amount of Available ram, by setting:  counter.CategoryName = "Memory"; counter.Countername = "Available MBytes";   But I can't seem to find a way to get the total amount of memory.  How would I go about doing this?  Update:  MagicKat: I saw that when I was searching, but it doesn't work - "Are you missing an assembly or reference?". I've looked to add that to the References, but I don't see it there.