General :: Explicit Memory Management For Applications
Mar 30, 2010
I am a newbie to Linux. I wanted to know how to explicitly manage memory for applications running on linux. For example, I want to create an application (using C) that has two separate physical address ranges associated with it. How do I assign explicitly those address ranges (the ranges are user defined) to the program?
I currently work within an RTOS environment without an MMU and thus have access to the entire memory map of whatever application I'm working on. As is common in the embedded world, different parts of the memory map relate to different peripherals or different types of memory. For our next generation hardware, my company is looking at moving to an MMU-enabled processor and using Linux in some shape or form. Most of us in the dept are familiar with Linux, but we are not Linux gurus by any means. So how to explicitly indicate to Linux that we need certain portions of an application to be stored in NVRam and other portions of the application to NOT be based in NVRam has us confused. None of us have a clear understanding of how user memory is delved out by Linux and how we can influence Linux to use specific portions of the memory map at specific times.
For example in this new application, we expect to have 2 memory chips, both that are DDR3 interfaces. One is a standard DDR3 chip. The other is a non-volatile MRAM with a DDR3 interface so it can be accessed by a DDR3 controller and coexist with conventional DDR3 memory. But because the portion of the memory map that the MRAM will represent will be the only portion of non-volatile memory, we are unclear how we explicitly access MRAM addresses in an MMU-controlled environment. My hail-mary guess was that we would want to somehow tell Linux that we want the MRAM's memory space to be mounted as a RAM Drive and then we access that memory as though it is a file on a HD, except it is much higher speed since it will be at DDR3/MRAM speeds. Is there a better, more straight forward way to do this? Coming from an RTOS world, Linux is going to pose some serious challenges for us, but I think it will be the right move once we are all up to speed and are thinking Linux-centric.
I am experiencing very high memory usage since upgrading, and it has gotten worse over the months since release. I noticed with all users logged out, I can go to terminal 1 and htop puts memory usage at 600MB for an idling, non logged in desktop. This wasn't the case on karmic, and my usage has not really changed. Upon logging in, it goes up to 800MB-1GB, on the desktop and idling. This has also been referenced at these places:
[URL]
Also, nautilus takes at minimum ~200MB and upwards of ~600MB sometimes, and Ive purged thumbnails already. That is utterly ridiculous for a window manager. why Lucid has gotten so bloated, and how to trim it up? Will Maverick address these issues?
A friend of my wife has opened up a hair salon. Not to big, only about 4 people working there so far. They purchased a POS system, that promptly failed a few days after purchase. They couldn't get any support through the manufacture or the seller as they didn't purchase the "customer care" package. To me thats absolute bull cocky, since it was a hardware issue. Since then he's been trying to find a new solution. He told me that the cheapest software he was able to find, that does what he wants, is around $1400 - software only not including hardware (and from the pictures he's shown me it looks like a telnet session or old dos based software)
I figured this can be done more efficiently if I build him a linux box running on a Mini-ITX system, with about 2gb of ram and maybe 500gb HDD. Small. Compact. Powerful enough to do what he needs and more. Maybe put in a 22" or 24" monitor. And I know there are usb powered "register drawers" available that are quite inexpensive.Problem is I'm running into a problem with finding any software for linux that does Salon management. When I'm talking Salon Management, I'm talking P.O.S functionality, booking appointments, reminders, inventory, and if possible, would keep track of services and products sold to a customer (customer history). I know that GnomeSalon will allow customers to even book appointments online. Problem is - it hasn't been updated on sourceforge since 2003.I've got a cloud system at home which I currently use for backups. On the cloud server I have a tape back up system. I am hoping to use Ubuntu 10.04 as the OS on this system, so that I can take advantage of the cloud capabilities - and see if I can work a deal where I'll take care of backing up his data remotely for a few $$ a month.
I don't think he needs anything enterprise level. Its one salon. It just opened. But who knows what the future will bring - but he can look into something enterprise level when he's got the $$ to back it up.I'm looking for any and all suggestions on this. I'm not looking for a strictly free alternative either. I'm sure if it's not to expensive, and the features are good, then he'll look at it as a viable option.
I have to figure out how to pass data between a Fortran application and a C++ application. The memory has to be locked/unlocked to prevent data corruption. I know very little about Fortran. I have done mutex lock/unlock stuff in Linux apps, multi-threaded, using mutex locks before.
Digging around on the Web, I do not find any info on a Fortran app including linux headers, library calls such as those in ipc.h, shm.h and sem.h. What is an approach to this problem?
I have installed ubuntu 10.04 using wubi installer..I am dual booting ubuntu with windows 7.I have alloted 8 gb of disk space while installing ubuntu.My first question is how can i know where the installed applications are stored and how much memory they occupy and how much free space is available out of the alloted 8gb.?My second one is now i have to install RAD 7.5 which requires 3.5 gb of free space..How can i expand the disk space without the need of reinstalling ubuntu.
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 have a computer with 16GB of ram. At the moment, top shows all the RAM is taken, (NOT by cache), but the RAM used by the various processes is very far from 16GB.I have seen this problem several times, but I don't understand what is happening.My only remedy so far has been to reboot the machine.
This is my first post in these forums. I'm still quite new to Linux (using Mint 9) so please bear with my not-very-articulate question(s)When I boot up and open up a tty terminal I get a message saying "Memory corruption detected in low memory." I've done an extensive google search about the issue and it seems not uncommon. I ran a memtest with no errors returned, so I'm sure that there's nothing really wrong with the memory; apparently it's a bug in the kernel that's causing this.
I found from command 'top' that 8GB memory are used. However, using command 'ps' with some options to grep the running processes and then summing up the memory used by the running processes are less than 2 GB. Where has the used memory gone ?
I have a perl script which was written for me by a professional (I have some basic knowledge), is working fine at the moment but on moving it to a different server as I'm changing a server (new server is shared and supports perl modules), I get the following message"Global symbol "$psid" requires explicit package name at admin.pl line 16". I get this for every single one for my values for the whole script which is about 2000 lines. Same error messages for main and admin.I haven't changed anything on moving it to the new server apart from the first line which is the location of the perl.I thought it would be too much to post the whole script here but anyone has any idea why is doing it taking into account that it works on a different server?
I'm looking to upgrade a few packages but noticed that the version available through Yum isn't necessarily the most up-to-date version as per the package website. One such example is Mysql:
[root@localhost ~]# yum info mysql-server Loading "installonlyn" plugin Setting up repositories
[code]....
If you look on the mysql website, the latest community edition is 5.1.50. I suspect the answer might be to do a distribution upgrade via media (i.e.: burn a CD) however was wondering if there's any ways around that?
I'm looking for a Web File Management Application to use in my intranet. All I need are users ACL and a simple interface. Ldap authentication would be a nice fit I saw something around like PHPfilenavigator, and for further info, I like Ubuntu distro. Right now I'm using the filemanager inside eGroupware but I'd like to dump it Can anyone give me some opinion and suggestion?
we need a software to close/disable USB/DVD-RW/CD-RW where we can close 50+ pcs users over the network.this means we can controll remotely like how we do adminsitration. as closing and opening each usb and cd-rom is very difficult the os are mixed like fedora,opensuse,windows xp/vista/7 etc purpose to restrict users to carry company data outside network or office
I'm fairly used to working with Fluxbox.There,if I want to let myself suspend the computer, all I have to do is add something like Code:[exec] (suspend) {sudo /usr/sbin/pm-suspend}to my .fluxbox/menu and it works like a charm, after having added me to the sudoers. I nstalled openbox earlier today because I was having some font rendering issues in flux and I've been trying to find a way to add something similar to my menu without success. I added this to .config/openbox/menu.xml:
I am trying to format 4 GB sd memory using mkfs.vfat. I want to use the card both in linux and windows so I am formatting with Vfat filesystem. When I format the card from command line with "mkfs.vfat -F 32 /dev/mmcblk1" I am getting a warning message like "unable to get drive geometry, using default 255/63" but the data in the card is erased.
But when I mount the card and checks for the size using df -h its showing 1 GB instead of 4 GB. how to format the SD memory card or any other alternate way to format the card.
On a couple of Linux laptops I have the built in screen never turns off it's backlight, regardless if a 'black screen' sort of screen saver is activated (this both for a laptop running an X-based desktop as well as for a laptop only having a text console) or if I even close the lid of the laptop (looking carefully in the dark, I can tell that the screen still has the backlight on, even if the laptop "know" it is closed).
This is a bad thing for a couple of reasons: It wastes power It generates heat which when the laptop lid is closed increases the cooling need (the fan goes on more often etc).
Backlights have limited lifetime like all electric components and IIRC, the less a backlight is turned on, the longer it will last. So, what is the best approach (considering a Gentoo with a 2.6.36 kernel) to remedy this? I recon that there probably are two approaches: One for text-only laptops which never displays a desktop, e.g a laptop sitting there acting like a firewall or server one for those running a Gnome/KDE/XFCE desktop (and a SLIM or GDM display manager).
The laptops I have in mind is a Dell Latitude CPi (built 1999, yes, it is from another millenea), a Compaq Armada M700 (built 2001) and a Dell Latitude D630. If this can be accomplished only by configuring things in the Linux OS (be it kernel setup or editing config files) without touching anything in BIOS, that would of course be preferable.
I'm curious how file association management is implemented in Linux. Where is the related information stored? How do I modify it (I'm interested in non-KDE-based ways; I know there's a system configuration page for that in KDE)?
Can anyone suggest a product that will allow a developer to raise a ticket (or similar sort of trackable item) which can be used to track the progress of a software build through a number of environments?Basically It's just a case of creating a ticket, using that to trigger a software build, then requiring some form of sign off to allow a second stage, and then another sign off for a third. It's not about building things, just tracking an issue through various stages of testing through to production.
I'm looking at replacing an environment which currently uses jira for this purpose, but I've no knowledge of it, and am keen on other GPL tools instead. Jira is, as a product, massively overkill for what is required too. So I'm keen on one which might fit in with the rest of my toolset - cobbler, func, puppet etc. I was looking at trac, which seems like it might have some relevant angles to it, but I really can't tell because having not done this sort of project before I don't honestly know what to call what i'm after. I don't *think* that something like bugzilla would be appropriate as it's too specifically about bug tracking, rather than a generic workflow with signoff stages and such.
So in an environment where I have 40+ sets of completely unique sets of logon credentials. The only way I've been able to manage this is by keeping them in a hidden and heavily encrypted text file in my home dir.Would like to hear alternatives to this approach if there are any, BTW. Right now I have a script that automates the process of un-encrypting the file, launching an editor and then clean-up with shred -u after editing and re-encrypting.
What bugs me is the interim where I have the file in an un-encrypted state on my drive. It doesn't seem necessary. I have a view script that allows me to see what's in the file without saving it to the drive.
can some one advise either on linux or windows, server/network manage software.say each server we can watch the cpu,memory,network card in/out speed, overload etc, any warning.