memory

PostgreSQL In Memory Database

Hi, I want to run my PostgreSQL database server from memory. The reason is that on my new server, I have 24 GB of memory, and hardly any of it is used. I know I can run this command to make a ramdisk: mdmfs -s 1024m md2 /mnt And I could theoretically have PostgreSQL store its data there. But the problem with this is that if the serv...

How do I structure the memory map in an N64 emulator?

According to Wikipedia, the N64 only has 4 MB of RDRAM (8 MB with the Expansion Pack), and the other quantities are similarly small (4 KB or so of L1 cache). However, technical documents I have found on Google state that its memory addresses range from $0000:0000 to $FFFF:FFFF -- that's 4 GB! Since existing N64 emulators like Project64 d...

Memory warning after using the UIImagePicker once

Hi, I've referred to this very good reference: http://stackoverflow.com/questions/1282830/uiimagepickercontroller-uiimage-memory-and-more but I'm having some very serious issues. After I take a photo, I receive a memory warning. This is for the first photo I take, not the second or third. I was wondering if it's because I've got a coupl...

How does free calculate used memory?

How does free calculate used memory and why does it differ from what /proc reports? # cat /proc/*/status | grep VmSize | awk '{sum += $2} END {print sum}' 281260 But free says: # free total used free shared buffers cached Mem: 524288 326488 197800 0 0 0 W...

memory and depth (vs. breadth) of recursion in c

I have two questions related to memory. First some background. I am a novice-intermediate c programmer. I have written several different tree like data-structures with variable number of nodes at each level. One such structure, can have as its data a number of integer variables, which themselves are primary data for integer trees. I ha...

How many threadsd i have to use

The scenario is that there is lets say 1 TB of objects each of ten mb in database. I have a function named MATCH() which has a query object, whose return type is double, and in this function I have mathematical calculations. I have a check that if the value of the result is in between 0 and 1 then i have: double[ ] Result=new double[eg...

Is the binary formatter smart about space when serializing?

Short and simple: If I have an object with many values == to their default constructor values, will a serialization with a binary formatter omit them in the resulting file to save space? I'm figuring, since the value is known from the class definition anyway. ...

java need storing values in a multi-dimension array. what is the best method to reserve memory space?

Hi at first sorry for my poor grammar. I want to build a simple hierarchical clustering algorithm in Java, so i need to build a similarity matrix, whose ij entry gives the similarity between i and j clusters. The first thought is using int[][] for storing this matrix (each cluster has an ID of type integer). I think that having for ...

Data layout in memory

If you have the integer 128 stored in a 2 byte / 16 bit integer mode memory, how is it layed out? In binary, bigendian, I think it's this: | 0000 0001 | 0000 0000 | But in hex, that would be this: | 0x01 | 0x00 | even though 128 in hex is 0x80. What am I not understanding? ...

copymemory() problem in windows

struct tagBITMAPINFO { BITMAPINFOHEADER bmiHeader; RGBQUAD bmiColors[1]; } BITMAPINFO; tagBITMAPINFOHEADER{ DWORD biSize; LONG biWidth; LONG biHeight; } BITMAPINFOHEADER BITMAPINFO bmiCurrWindow; capGetVideoFormat((*m_pCapWndArray)[i].hCapWnd, &bmiCurrWindow, formatsize...

C++ : When do I need a shared memory allocator for std::vector?

First_Layer I have a win32 dll written in VC++6 service pack 6. Let's call this dll as FirstLayer. I do not have access to FirstLayer's source code but I need to call it from managed code. The problem is that FirstLayer makes heavy use of std::vector and std::string as function arguments and there is no way of marshaling these types int...

Memory alignment on modern processors?

I often see code such as the following when, e.g., representing a large bitmap in memory: size_t width = 1280; size_t height = 800; size_t bytesPerPixel = 3; size_t bytewidth = ((width * bytesPerPixel) + 3) & ~3; /* Aligned to 4 bytes */ uint8_t *pixelData = malloc(bytewidth * height); (that is, a bitmap allocated as a contiguous bloc...

Flex viewstack keeps redrawing invisible child, how to fix?

The situation: I've got a ViewStack with 2 children (both of type Panel). The application starts with child 1 as the SelectedChild. With a click on a button, child 2 is the SelectedChild. After that, I return to child 1 being the SelectedChild. When I click Show Redraw Regions in the Flash Player, I can see child 2 being redrawn the w...

ToolStrip memory leak

Hi, I've been having trouble with memory leaks with the SWF-ToolStrip. According to this http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=115600# is has been resolved. But here it seemes not. Anyone know how to resolve this? ...

Logical address confusion

Hi, I am trying to do some analysis with the logical address. The following program explains my motive ... #include<stdio.h> int main() { int x=10; printf("The address of main is %p\n",&main); printf("The address of x is %p\n",&x); return 0; } When I run this program in my 32bit system it shows The address of main is 0x80483b4 T...

Library for defragmenting memory

Does anyone know of a dll to defragment memory for a Windows 2003 server? Here's the background: We have a .net ecommerce site that uses a pre-made framework for most of the heavy lifting. The website occasionally gets out of memory exceptions when trying to allocate memory when adding objects to the cache. It mostly happens when the ...

Physical/in-Memory database. (for logging purposes on my website)

We all know MYSQL. We all know memcached. I love memcached. You have a string key , and it returns a value. Dead simple. Is there a database for memory? For example, I am building a website that needs to keep track of LOGGING. Everything people do...I need to keep track of. But it would be slow to write to disk every time someone hi...

How can I know where the segment of memory is all Zero

I mean, I malloc a segment of memory, maybe 1k maybe 20bytes.. assume the pointer is pMem How can I know the content pMem refered is all Zero or \0 . I know memcmp but the second parameter should another memory address... thanx ...

ActionScript 3 Profiler & Memory Analysis Tool

Hi guys, I'm using Adobe Flash CS 4 and would like to know are there any profiler or memory analysis tools available for it ? (actionscript 3). I know there are available tools for Flex, but are there for Flash CS 4 instead? Thanks. ...

Staying away from virtual memory in Windows\C++

I'm writing a performance critical application where its essential to store as much data as possible in the physical memory before dumping to disc. I can use ::GlobalMemoryStatusEx(...) and ::GetProcessMemoryInfo(...) to find out what percentage of physical memory is reserved\free and how much memory my current process handles. Using ...