MEMORY(3) BSD Library Functions Manual MEMORY(3)NAME
malloc, free, realloc, calloc, alloca, mmap -- general memory allocation operations
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <stdlib.h>
void *
malloc(size_t size);
void
free(void *ptr);
void *
realloc(void *ptr, size_t size);
void *
calloc(size_t nelem, size_t elsize);
void *
alloca(size_t size);
#include <sys/types.h>
#include <sys/mman.h>
void *
mmap(void * addr, size_t len, int prot, int flags, int fd, off_t offset);
DESCRIPTION
These functions allocate and free memory for the calling process. They are described in the individual manual pages.
SEE ALSO mmap(2), alloca(3), calloc(3), free(3), malloc(3), realloc(3)STANDARDS
These functions, with the exception of alloca() and mmap() conform to ISO/IEC 9899:1990 (``ISO C90'').
BSD June 4, 1993 BSD
Check Out this Related Man Page
MEMORY(3) BSD Library Functions Manual MEMORY(3)NAME
alloca, calloc, free, malloc, mmap, realloc -- general memory allocation operations
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <stdlib.h>
void *
alloca(size_t size);
void *
calloc(size_t nelem, size_t elsize);
void
free(void *ptr);
void *
malloc(size_t size);
void *
realloc(void *ptr, size_t size);
#include <sys/mman.h>
void *
mmap(void * addr, size_t len, int prot, int flags, int fildes, off_t off);
DESCRIPTION
These functions allocate and free memory for the calling process. They are described in the individual manual pages.
LEGACY SYNOPSIS
#include <sys/types.h>
#include <sys/mman.h>
void *
mmap(void * addr, size_t len, int prot, int flags, int fildes, off_t off);
The include file <sys/types.h> is needed for this function.
COMPATIBILITY
mmap() now returns with errno set to EINVAL in places that historically succeeded. The rules have changed as follows:
o The flags parameter must specify either MAP_PRIVATE or MAP_SHARED.
o The size parameter must not be 0.
o The off parameter must be a multiple of pagesize, as returned by sysconf().
SEE ALSO mmap(2), alloca(3), calloc(3), free(3), malloc(3), realloc(3), compat(5)STANDARDS
These functions, with the exception of alloca() and mmap() conform to ISO/IEC 9899:1990 (``ISO C90'').
BSD June 4, 1993 BSD
Can anyone tell me why this section of code causes a segmentation fault when 'deallocate' is called?. Although it works when n>=number.
This code segment is intended to be used in a program in which the tensor is very large, (5x512x512) or greater.
i tryed to compile this using gcc version... (2 Replies)
Hi, I've been a member for a while but have never posted. I have a Sun Blade 100 desktop and I just installed Solaris 10 and it is unbearably slow. I only have 128 Meg of RAM and need to upgrade. I have searched and found many online resources that have RAM, but I was wondering if anyone has... (12 Replies)
Hi All Unix experts,
I want to calculate CUP Utilization and Memory Utilization on solairs boxes.
Please help me to write a script for this, since i am doing this manualy for more than 30 servers daily.
My daily task is
# top
last pid: 28627; load avg: 8.50, 8.12, 8.16; up... (4 Replies)
hi all,
i want to write a script that checks the memory usage of processes and send a mail with the name of the process witch is using more then 300mb RAM.
dose anybody have a sample script or an idea how i can make it ?
PROCCESSES="snmpd sendmail"
for myVar in $PROCCESSES
do
... (7 Replies)
I have a Java program. I want to measure the total memory used by the program, especially the peak memory. Is there a way to do it?
I have tried utilities like time (which returns 0) and top (which is not very useful) as the program does not run for long.
Can anyone suggest a way to do this?... (5 Replies)
I have created a shared memory segment (which size is 64 bytes) using shmget, shmat e.t.c and i want to divide it into 2 areas. One area for input data and one area for output? How can i do that?
Furthermore, When i have to write my input data into the shared memory segment i want to write... (3 Replies)
It is customary to use structs in c code. but it is suprising to obtain different results. Sometimes a pointer is returned. But a failure would appear at other attempts.
e.g.
struct _site {
int type;
char A;
char B;
.
.
... (12 Replies)
Hi,
I'm running a multi-process software system on a Solaris 8 machine. When I monitor the memory usage, I see that the free memory is dropping rapidly, but I can't detect a process that uses this memory.
I'm using "top" to get the free memory and the memory usage of processes.
Thanks. (3 Replies)
I have a solaris10 box running a java application on it. Whenever the java app is used heavily, the amount of free memory decreases fairly rapidly. I believe I have eliminated the running applications from the culprit list. In the process I have found that the page cache is consuming about 20G... (4 Replies)
Hi,
When I run the free command on solaris, I get the following:
"Memory: 60G phys mem, 69G free mem"
Q: how cna the free mem be higher then the physical mem?:confused:
Amit (3 Replies)
Hey there,
I am currently learning shell scripting.
My first script is a 4chan image downloader, which so far works, but seems to be a memory eater. My Raspberry Pi 2 (1GB RAM) needs to swap sometimes. The free RAM quickly goes down from 700 MB to zero. I don't know the cause, but it would be... (3 Replies)
Friends,
I have 8CPU/24gb RAM in my Linux servers around 30+. All the servers are running with Java based application with NFS mounted.
The problem what I have is, When I reboot servers the server memory looks decent. But after some time the "cached" memory increasing and "free" memory... (5 Replies)
Hello,
I have few Solaris 11.2 servers. Since sometime, we are noticing high memory utilization in them.
Here is current config
root@ser22-zonemgr:~# /tmp/memory.sh
Physical memory size: 36864
Memory usage in MB: 32938
Memory usage in %: ... (4 Replies)