General :: Mapping Memory Space To A Path/filename?
May 4, 2010
I'm working with a lot of data, but always the same. I have, say 2GB that I keep loading 100 times a day from a local disk to do some computations.I was wondering if anyone knew if it is possible to read it once for all and then access it like a file but with the speed of RAM access. I would be looking for something like: Code: file2mem ~/mybigdatafile.dat ~/mybigdata_thats_now_accessed_superfast.dat And then the data is accessible in a way like with a symlink...
As i undertsand - out of 1GB of the virtual Address space for Kernel from 3GB to 4GB of the process address space, Kernel image (code, data, bss, stack, heap) resides staring @0x0 address. Vmalloc area starts either at the end of Physical ram size or at 896M. This 896M cap is mandated to ensure that minimum of 128MB is reserved as vmalloc_reserve for vmalloc,kmap etc.
Is the understanding correct? Now trying to map Physical Zones into this 1GB address space
Initial 16MB is mapped to ZONE_DMA 16MB - 896MB is mapped to ZONE_NORMAL 896MB - 1024MB is mapped to ZONE_HIGHMEM
Does this mean that Kernel image is residing in ZONE_DMA area? Any call to vmalloc() in kernel code will return address beyond 896M? insmod of any LKM will internally invoke vmalloc() to obtain contiguous area - where will this code physically located along with rest of kernel code in ZONE_DMA or in ZONE_HIGHMEM?
Logical Memory Space of 4GB is divided in to 3GB User Space and 1GB Kernel Space. Always. Correct?
1. How can we change it? (just changing value of PAGE_OFFSET is okay?)
2. If system have only 256MB of memory (embedded system) and suppose Kernel Modules eat away all the memory during boot. User space will be left will no memory. Is this case possible?
I have local Wordpress database that got corrupt as a result of an abrupt power outage (I wasn't even editing it!).
Since the system I am dealing with is pretty static (and old), I just want to restore that database file (or collection of files) from a nightly backup.
But I don't know which files I should be restoring. The WordPress blog in question is installed under a local user account in an old Linux server (FC4).
I checked the wp-content directory, but apparently this is not where the content is:
Any idea which file(s) I should be restoring and what their path is?
I am using malloc and frees a lot in my program. It shows its allocated but when i remove it doesnt show as the memory is removed(I am using the top command to view VIRT memory usage). If this continously grows what would happen to my program (Will it go out of memory?)
I need to read many files very fast: reading them from the disk leads to bad performance!!I copied the files into /dev/shm, being sure that they were copied in memory, but the performance didn't improve.Then I created a tmp file system in /mnt (/mnt/tmpfs) and I mounted it withmount -osize=400m tmpfs /mnt/tmpfs -t tmpfsand copied the file in. But the performance still remain almost the same.I've the doubt that I didn't copied the file in memory!The question is: Did I make the right things?I run a FC 11 64 bit on a dual procs server with 16 Gb memory
$ uname -a Linux a 2.6.35.10-74.fc14.i686.PAE #1 SMP Thu Dec 23 16:10:47 UTC 2010 i686 i686 i386 GNU/Linux $ lsb_release -a LSB Version: :core-4.0-ia32:core-4.0-noarch
[Code].....
How can I set a pattern that will output a filename equal to the original filename? E.g.
So, I was working with Ubuntu 9.10 and I wrote a C program which was working just fine. Then, I have installed Ubuntu 10.10 and tried to run this same program again. However, I get the following error: Code: Memory Mapping failed. Error: 1 Part of the code has the following: Code: volatile ulong *memory;
int fd = open("/dev/mem", O_RDWR | O_SYNC); if (fd < 0) { printf("Could not open memory. "); return(0); } code....
Does anyone have an idea what the problem could be? I do not know if there would be any significant change between Ubuntu 9.10 and 10.10 that could be generating me this problem.
In short: the files in 11.2 of the memory card from my camera were lower case, and in 11.4 they are upper case. Thus, F-spot uploads all the photos again, and I get two copies of each, one low case (old), another upper case (new), without the comments or rotations that I had made. How can I make the system automount it again in lower case? I knew the proper options to do this manually in fstab, but not via udev or whatever it uses.
When we want to setup a linux system, there is a common a suggestion like set the swap space as twice as big than your physical memory, I want to know why do we need this and how is this suggestion come from?
When I use top to see memory usage, I have 65gb ram but only 1.3gb of it free and remaining is shown as used. When I ran my program It gives memory insufficiency error. Although no other program is using the remaining 63.7gb ram it is hold. How can I get free the unused ram?
I've installed ethernet adapter, it is made in china from a manufacturer called FOX. The driver for that adapter is supported for sco linux kernel version 2.4.x and 2.5.x .However, I'm using Centos5 but the OS didn't recognize the adapter alone, so I'm trying to follo instructions on the driver on the attached CD.
The CD contains file named "SC92031.c", the instructions tell me to do the following "Compile the driver source files and it will generate sc92031.o"
I'm taking here about tins of directories, thousands of files. I'm looking to find a command that makes me able to move the results above to another path, and to create that path once it doesn't exist like below:
I have a program that takes a relative path as input appends it to a some path string to get the actual path.
Now all I can input is the relative path. So if I want to go one level above my input will be ../mypath.
If I know the depth of the path used internally, I can use .. as many times to go to the root directory and then give the absolute path. But suppose I do not know the depth of the directory, can I construct a relative path string such that it considers it as a relative path. One way could be to have enough .. in the path string so that I can force an absolute path for some maximum depth of path.
Is there some path string syntax that I am not aware of but can achieve this?
Experimenting with shell variables, accidentally deleted the path variable how could I return to the original path value. What kinds of problems will I have if I don't have a path variable.
I want to know if i can increase the memory space allocated for a process manually while the process is running ,,,, and if it is possible how i can do this .
A few years back when I was running Linux most of the time I used a program that gave me information on my machine.
It had different themes and such, and it would usually rest vertically along the side of the desktop. It would tell one information on drives, space, memory, I think you could even have it tell you the weather if you entered geographical information.
I know I'm being a bit vague but that's all I can remember, does anyone recall this program? It was pretty popular back then...so I wonder if it's still under development.
I have a path c:windowsackup I need this string to be changed into /windows/back/up I used the command -bash-3.00$ echo windackup | sed 's/\//g' but the output is windbackup
prefix=user@my-server: find . -depth -type d -name .git -printf '%h�' | while read -d "" path ; do ( cd "$path" || exit $?
[code]....
How shall i go about changing the absolute path to relative path, so that /home/git/mirror/android/adb/ndk.git gets converted to /mirror/android/adb/ndk.git //echo <command> "$prefix$PWD.git" ?? - anything for relative path?
i had configured the opennms but i didint able to get the disk space and memory alert by mail... and also i need a plgin gor opennms can u tell me wat plugins suit for opennmms monitoring tool ...
I'm running an embedded Linux kernel, and I want to obtain a real memory address from user space. After goggeling a little, I found that the only way was to use mmap to access /dev/mem. But I never used mmap. I want to load a program in memory, in order to make it available from another processor, that has access to the DDR, but not to the flash memory where program is stored. Here is the code I use:
Code: // Open file and get its size FILE* program = fopen(argv[3],"rb"); fseek(program, 0, SEEK_END); long program_size = ftell(program); fseek(program, 0, SEEK_SET); // Prepare memory to copy it in void* program_address = malloc(program_size+1); FILE* memory_stream = fmemopen(program_real_address, program_size + 1, "wb"); [Code]....