Programming :: Allocate Memory To A Program Before Execution?

Jan 3, 2011

I went to an interview last week and there was this guy who asked a simple question that i have been trying to solve for a couple of days. I tried google but i just cant get the search keywords right. The result were just useless. Well, the question is : "How can we allocate a limited memory to a process before we start its execution" well, the question is related to an X11 system so may be some flags must be set to limit its memory.

View 9 Replies


ADVERTISEMENT

Programming :: Vuse The Capacity Feature To Allocate All Memory At Beginning Of Program?

Jan 7, 2010

I have a vector that I do not want to call new on during operation so I use the Capacity Feature to allocate all memory at beginning of program

Code:
struct chartype
{
public:
unsigned char value[MAXCHARTYPE_SIZE];
};

[Code].....

View 2 Replies View Related

Ubuntu :: How To Allocate Memory To Program?

Nov 24, 2010

I am running BWA (burrow-wheeler alignment) and, keep getting an error that there isn't enough memory allocated. How do I change the memory allocation? I'm working on a good quality desktop only a little over a year old, so having the memory shouldn't be the problem.

View 9 Replies View Related

Programming :: Malloc Fails To Allocate Memory

May 7, 2011

I am developing a code where I need to store the planes of an object in a tree & also i need to store it in a list for further processing ... when I try to allocate using malloc the memory allocation when i checked this in internet , I came to know that it may because the memory that I am trying to allocate may be more than the size_t variable.

View 9 Replies View Related

Programming :: Memory Allocate In Function And Call It By Reference For Array Structure?

Jul 2, 2011

I am writing a function(in C language in Linux) to initialize an array of a structure from a mysql table by calling a function by reference but I have a problem with call this function by reference . this is my program:PHP Code:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

[code]...

View 4 Replies View Related

Programming :: Restart The Program Execution - Java

May 3, 2011

In gui validation if user enters string in integer requiring field, a dialog box pops out. So on clicking the button i want to stop the program execution and return to the previous jframe(either the same one or newly created object of it).

How can i handle this in java.
I tried calling main(); but it doesn't work.
Also System.exit(0); doensn't work.

View 1 Replies View Related

Programming :: Continue Execution Of A Python Program While A Background Task Is Going On?

Aug 28, 2010

I'm trying to figure out how to continue execution of a Python program while a background task is going on.

In bash, it is adding "&" to the end as in:

Code:
#! /bin/bash
find / -iname "*.py" > /tmp/all_pys &
echo "looking for all python scripts and putting them in /tmp/all_pys"
(yes, I know I could just put the echo BEFORE the find but I just use it for example)

Say I do that in python (not necessarily running the shell, but perhaps using scriptutil.ffind or something similar), but want to allow the user to be doing something else while running that search in the background, how would I thread, fork, subprocess (not to be confused with the module and Popen) [or whatever I should call it] that?

View 14 Replies View Related

Ubuntu :: Memory Error When Installing Python - Cannot Allocate Memory

Apr 19, 2010

I get this error when I run "sudo apt-get install python-software-properties"

Preconfiguring packages ...
dpkg: unrecoverable fatal error, aborting:
fork failed: Cannot allocate memory
E: Sub-process /usr/bin/dpkg returned an error code (2)

I'm trying to install deluge via ssh and my vps has 512mb ram and is only using 11% of it prior to running the code.

View 2 Replies View Related

Ubuntu :: How To Allocate More Memory

May 16, 2010

i just recently installed ubuntu 10.04 onto my laptop. its running as a dual boot. i only allocated about 10gb of memory and have already run out. is it possible to allocate more memory afterwards

and another bug that i am having is my shift key is not functioning properly. if anyone happens to know this issue too. so i can't do exclamations of periods, capitalizations, etc... how would you remap your keyboard

View 7 Replies View Related

Ubuntu :: Getting Cannot Allocate Memory

Feb 22, 2011

I have mounter ubuntu karmic 9.10 on a XP sp3 using vmware,i wanted to move some files through share.everything went well for 2 hours then i keep getting Cannot allocate memory.

View 2 Replies View Related

General :: Allocate The Use Of The Memory?

May 4, 2011

I'm running a quite complex model, and it's taking me around a week to complete the run, and one of my colleagues says that he can run it in one-two days. After looking to several forums to know how does it work, I've seen how the memory is used (using the command ps -A --sort -rss -o comm,pme), and the model run just takes 0,3% of the memory. I bought a 4 cores and 8gb of RAM laptop to be able to run the model fast, but I don't know how to allocate the use of the memory to concentrate it in developing that task. Is that possible?

View 2 Replies View Related

Software :: Cannot Allocate Memory

May 3, 2011

when I try to execute busybox on Redhat Linux 4 I am getting the following error. Any idea why ?

View 1 Replies View Related

General :: Unable To Allocate Enough Memory

Jun 20, 2011

On SunOS 10 get an error when starting a large Java process with over 2Gb memory.

View 4 Replies View Related

Software :: How To Allocate More Than 2GB Memory For An Application On 32 Bit?

Oct 6, 2010

Can anyone tell me is there a way to add more than 2GB memory application in a 32 bit server? I found on many threads that it is not possible to set memory limit of a particular application to more than 2GB. I am using Fedora release 8 and trying to add more than 2GB memory to tomcat. If I modify the variable CATALINA_OPTS in /opt/bobcat/bin/catalina.sh (Startup script of tomcat) and add a value greater than 2GB for memory, tomcat wont start.Is there any work around / Kernel Patches available? Suggestions??

View 10 Replies View Related

Debian Multimedia :: ATI Driver: Can't Allocate Memory?

Oct 24, 2010

This is a clean install of Debian Lenny, using KDE3.5.10 desktopHave followed these instructions:http://wiki.debian.org/ATIProprietary

Using kernel 2.6.26-2-686, I think the fglrx module has been built correctly.
orac:~# modinfo fglrx
filename: /lib/modules/2.6.26-2-686/nonfree/fglrx/fglrx.ko

[code]....

View 2 Replies View Related

OpenSUSE Hardware :: Rt2860sta.ko - Cannot Allocate Memory

Jun 9, 2011

I just switched over to openSUSE about a week ago from Ubuntu and I just purchased an Asus N13 PCI-E wireless network adapter which uses an RALink 2860 chipset. I plugged it in and openSUSE was able to detect it and everything but when I went to go configure it using YaST, it wouldn't be able to scan for networks.

So, I reinstalled my old adapter, downloaded the latest source from RALink and compiled the drivers. When I tried to use insmod on the new .ko that was compiled, I got the "Could not allocate memory" error.

If you need dmsg logs or anything else, I can reinstall the card and get those.

View 4 Replies View Related

Programming :: Manage Memory To Speed Up Program?

Nov 18, 2008

I wrote a program in lcc in windows and I have to write it in gcc in unix. In lcc there was an option to use more memory than the default for the stack. The following code is working in lcc but in gcc it gives segmentation fault:

#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <time.h>
int main()
{

View 11 Replies View Related

Programming :: Possible To Know The Amount Of Memory Used By A Program Before Running It?

Mar 3, 2009

I would like to know if there is a linux command to verify the amount of memory used by a program. The programs I am using were compiled with gfortran.

View 2 Replies View Related

OpenSUSE Install :: Unable To Allocate And Lock Memory?

Jan 20, 2010

On my windows console, i have installed sun virtualbox. I only have 768MB ram and so i downloaded a trial version of eboostr. I thought it would work, but when i tried an install of 11.2, also, i tried a debian install, it did the same thing, it froze up in the middle of the install with the error Code: unable to allocate and lock memory. I guess that eboostr doesn't work, but is there a way to use a flash drive as ram in virtual box?

View 5 Replies View Related

Server :: Error - Unable To Fork: Cannot Allocate Memory

Feb 6, 2011

While Apache is off, then everything is OK, but if I start apache server after some time I get messages "Unable to fork: Cannot allocate memory" when trying to do some commands with ssh(dir,rm,top and so on).

P.S. There is free RAM when I get that message.

View 2 Replies View Related

Programming :: Find Which Block Of Program Consume How Much Memory?

Apr 15, 2011

I am trying to run C++ program on linux.

My program consume a lot of memory so that the memory is used up fast and memory swap is very high.

I can find this by "ps" .

My program is long.

I need to find out which part of my program consume so much memory ?

View 1 Replies View Related

Programming :: Memory Corruption While Parsing In Multithread Program?

Aug 28, 2009

language: C
OS: linux

I wrote a multithread program(approx 1000 thread have to run) and each thread has to parse a file(for each thread there is one file, ex:thread1 has to parse file1 and thread2 has to parse file2 like this....). I wrote "parse" program as follows. It is working well, if i create 50 threads. but if i run more than 200 thraeds Im getting doublefree corruption as follows:

Code:

*** glibc detected *** ./simulator: double free or corruption (fasttop): 0xb70007b0 ***

And some time I am getting parsing problem and error af follows:

Code:

powersetting.6607:1: parser error : Start tag expected, '<' not found (where powersetting.6607 is file name, when i check this file it is started with '<').

parse program as follows:

Code:

void parse_first(char* filename, int portnum, struct Poweroff *Powerptr1)
{
struct Poweroff *Powerptr;
Powerptr = Powerptr1;

[code]....

View 1 Replies View Related

OpenSUSE Network :: 11.3 - No Ethernet After Sleep (Suspend To RAM) - Cannot Allocate Memory

Oct 17, 2010

After updating to openSUSE 11.3, and restarting my computer, I placed my computer in sleep(suspend to RAM) mode, and I lost my internet connectivity. I noticed that my computer was only connected through ethernet. After entering "dhclient eth0" in a terminal, I received the following output.

Code:

RTNETLINK answers: Cannot allocate memory

This is the first time that I have had issues with connecting to the Internet using Ethernet.

View 6 Replies View Related

CentOS 5 :: Mail Server Stopped Working - Cannot Allocate Memory

Jan 21, 2011

My mail server stopped working this weekend, when I got in today I restarted and all the emails came through. The panic_log shows: daemon: accept process fork failed: Cannot allocate memory several times over the course of a few minutes. Can anyone give me advice on troubleshooting this one?

View 1 Replies View Related

Debian Programming :: Memory Usage When Running Java Program

Jun 28, 2013

I have a java program that runs on Debian as a background processor. Yesterday the Java program stopped running. I looked at the memory usage, the system only had 5MB memory left, so my guess is that the java program ran out of memory to use.

However, after we restarted the java program, we could see that the free memory count started to go up. It kept going up from 5MB to over 400MB. The increase of memory happened slowly, when I measured it, I could see that with each minute passing by, there were a bit more memory added into the free memory pool, and meanwhile, the java background process was running.

I wonder why this would ever happen. It's as if our java program first brought the machine done because it consumed all the memories, then after restart, it starts to give back memories.

View 2 Replies View Related

Programming :: Quick Measurement Of Free System Memory From Within C Program

Jul 21, 2010

I need to monitor the amount of free physical memory on Linux from within a large C program. The sampling will occur very frequently, so the measurement cannot be performance intensive. The fact that Linux uses much of the theoretically free memory for cache and buffers means that just measuring the free pages is not sufficient. Using free + cache + buffers gives an overestimate as not all cache/buffers can be freed, but I could get a rough idea of how much generally can't and subtract that from the answer.

Possible options that I've come across so far are: Parsing /proc/meminfo - but that involves reading from file which is slow. Extracting the free, cache and buffers values from the output of the Free command - but is there a quick way to do this? Parsing the /proc/freemem file produced by the API here - but this is again reading from file. Is there a way to get that output directly? Speed is an extremely high priority, and the answer it must accurately represent the amount of memory that my program could expand into (to within a few Mb).

View 1 Replies View Related

Fedora :: C Program Execution Using Gcc?

Jul 12, 2011

i m using gcc to compile certain programs.they get successfully compiled but fail to execute.Here is a sample code and the error [tommy@tommy cprog]$ vi test.c

#include<stdio.h>
int main()
{[code]....

a similar problem arises with codeblocks for the same program.the error is the same even when it is just main() and absence of return 0;
the problem exists also on c++.i m using Fedora 15

View 5 Replies View Related

General :: Allocate Fixed Port For Program?

Feb 3, 2010

I have written a program which uses port 5000. I need to restrict other programs use this port when I'm not running that program. In Linux are there a mechanism to restrict port 5000 accesses from other programs.

View 2 Replies View Related

General :: Execution Time In A C Program ?

Jan 10, 2010

I need to find out the processing or operating time in milliseconds or in nanoseconds for the instructions or for the whole process!

for eg :

I need to calculate the time taken to execute :

And i dont want the time for whole program :

View 4 Replies View Related

Ubuntu :: Program Execution Time And Processor Affinity?

Aug 7, 2010

I have some questions.First, how can i obtain a process execution time ( after it terminated)??? Second, in a multi-core system like SMP how can i run different processes on different cores explicitly? i.e. how can i assign a process to a specific core?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved