Sponsored Content
Full Discussion: memory allocation
Top Forums UNIX for Dummies Questions & Answers memory allocation Post 12670 by sagar on Friday 4th of January 2002 05:11:20 PM
Old 01-04-2002
Data memory allocation

I would like to know how I could allocate some more memory to a process.
Please note that I am not the root user.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

threads and memory allocation

Hello! First of all, forgive me for bad English. When I starts new thread (pthread_create), system allocates some memory for it (for example, for thread's stack). I wonder when does it deallocate this memory? The problem is that I have a program which sometimes creates new threads and sometimes... (3 Replies)
Discussion started by: prankster
3 Replies

2. HP-UX

HP-UX memory usage allocation

Hi all, I have a HP-UX Server with 4 gigabytes of physical RAM. When I use the 'Glance' utility to see what my memory utilization is, my memory usage shows up maxed out at 99%. I shut off all the known processes that I'm running on that box and the memory utilization is still at 78% (with Swap... (3 Replies)
Discussion started by: dehuang83
3 Replies

3. Programming

Dynamic memory allocation

Hi, I am trying to process line by line of a file. But I should not be allocating static allocation for reading the contents of the file. The memory should be dynamically allocated. The confusion here is how do I determine the size of each line, put it into a buffer with the memory allocated... (11 Replies)
Discussion started by: naan
11 Replies

4. Programming

Memory allocation problem

I have a program that will fetch some particular lines and store it in a buffer for further operations.The code which is given below works but with some errors.I couldn't trace out the error.Can anybody help on this plz?? #include <stdio.h> #include <stdlib.h> #include<string.h> #define... (1 Reply)
Discussion started by: vigneshinbox
1 Replies

5. Programming

Is there a problem with the memory allocation???

I have a scenario like the client has to search for the active server.There will be many servers.But not all server are active.And at a time not more than one server will be active. The client will be in active state always i.e, it should always search for an active server until it gets one.I... (1 Reply)
Discussion started by: vigneshinbox
1 Replies

6. Programming

memory allocation in subroutine

Hi everyone, I'm not new to C programming, but I'm having question regarding the memory allocation of a pointer variable which, for instance, will be declared in main(), but its memory will be allocated in subroutine. To clearify my question, I provide a small working example: #include... (1 Reply)
Discussion started by: MIB_Maik
1 Replies

7. Programming

Memory allocation in C

Hi Experts I need some help in static memory allocation in C. I have a program in which I declared 2 variables, one char array and one integer. I was little surprised to see the addresses of the variables. First: int x; char a; printf("%u %u\n', &x, a); I got the addresses displayed... (2 Replies)
Discussion started by: unx_freak
2 Replies

8. Shell Programming and Scripting

memory allocation to a variable

hello all.. i'm a beginner in shell scripting. I need to know what is really happening when we are creating a variable in shell scripting? how memory is allocated for that variable? (3 Replies)
Discussion started by: aarathy
3 Replies

9. Programming

memory allocation for string in C

hi in the following code, how the memory is allocated for a1 which holds the values of a2 after cpy function call. #include <stdio.h> #include <string.h> void cpy(char* d, const char* s){ while(*d++=*s++); } main(){ char* a1; char* a2="done"; cpy(a1,a2); ... (3 Replies)
Discussion started by: mprakasheee
3 Replies

10. Programming

C++/ROOT Memory Allocation?

Hello, I am new to C++ programming, so I'm still getting a feel for things. I recently wrote a simple C++ program (to be used as a ROOT Macro) to conduct a statistical analysis of a varied version of the Monty Hall problem (code below). Basically, the programs runs a few simple calculations to... (7 Replies)
Discussion started by: Tyler_92
7 Replies
memtester(8)						       Maintenance Commands						      memtester(8)

NAME
memtester - stress test to find memory subsystem faults. SYNOPSIS
memtester [-p PHYSADDR] <MEMORY> [ITERATIONS] DESCRIPTION
memtester is an effective userspace tester for stress-testing the memory subsystem. It is very effective at finding intermittent and non- deterministic faults. Note that problems in other hardware areas (overheating CPU, out-of-specification power supply, etc.) can cause intermittent memory faults, so it is still up to you to determine where the fault lies through normal hardware diagnostic procedures; memtester just helps you determine whether a problem exists. memtester will malloc(3) the amount of memory specified, if possible. If this fails, it will decrease the amount of memory requested until it succeeds. It will then attempt to mlock(3) this memory; if it cannot do so, testing will be slower and much less effective. Run memtester as root so that it can mlock the memory it tests. Note that the maximum amount of memory that memtester can test will be less than the total amount of memory installed in the system; the operating system, libraries, and other system limits take some of the available memory. memtester is also limited to the amount of memory available to a single process; for example, on 32-bit machines with more than 4GB of memory, memtester is still limited to less than 4GB. Note that it is up to you to know how much memory you can safely allocate for testing. If you attempt to allocate more memory than is available, memtester should figure that out, reduce the amount slightly, and try again. However, this can lead to memtester successfully allocating and mlocking essentially all free memory on the system -- if other programs are running, this can lead to excessive swapping and slowing the system down to the point that it is difficult to use. If the system allows allocation of more memory than is actually avail- able (overcommit), it may lead to a deadlock, where the system halts. If the system has an out-of-memory process killer (like Linux), memtester or another process may be killed by the OOM killer. So choose wisely. OPTIONS
-p PHYSADDR tells memtester to test a specific region of memory starting at physical address PHYSADDR (given in hex), by mmap(2)ing /dev/mem. This is mostly of use to hardware developers, for testing memory-mapped I/O devices and similar. Note that the memory region will be overwritten during testing, so it is not safe to specify memory which is allocated for the system or for other applications; doing so will cause them to crash. If you absolutely must test a particular region of actual physical memory, arrange to have that memory allocated by your test software, and hold it in this allocated state, then run memtester on it with this option. MEMORY the amount of memory to allocate and test, in megabytes by default. You can include a suffix of B, K, M, or G to indicate bytes, kilobytes, megabytes, or gigabytes respectively. ITERATIONS (optional) number of loops to iterate through. Default is infinite. NOTE
memtester must be run with root privileges to mlock(3) its pages. Testing memory without locking the pages in place is mostly pointless and slow. EXIT CODE
memtester's exit code is 0 when everything works properly. Otherwise, it is the logical OR of the following values: x01 error allocating or locking memory, or invocation error x02 error during stuck address test x04 error during one of the other tests AUTHOR
Written by Charles Cazabon. REPORTING BUGS
Report bugs to <charlesc-memtester-bugs@pyropus.ca>. COPYRIGHT
Copyright (C) 2009 Charles Cazabon This is free software; see the file COPYING for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. memtester 4 July 2009 memtester(8)
All times are GMT -4. The time now is 02:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy