Sponsored Content
Operating Systems Linux Red Hat centOS memory leak - MEGABYTES per day Post 302512683 by pludi on Monday 11th of April 2011 09:20:21 AM
Old 04-11-2011
Linux says it's used (meaning it's allocated), but it has a lower priority than application memory. Should applications require more space, the buffer and cache sizes are gradually reduced, and the free space is made available.

The '3' tells the kernel (to which /proc is the interface) to drop all file buffers and filesystem caches that aren't "dirty" (modified in memory only; not yet written to disk). There's a description here. But again, it's not really required to clear that memory, since it's re-allocated to applications should they need it.
 

9 More Discussions You Might Find Interesting

1. Programming

about virtual memory and memory leak

Hi, First of all I appreciate this group very much for its informative discussions and posts. Here is my question. I have one process whose virtual memory size increases linearly from 6MB to 12MB in 20 minutes. Does that mean my process has memory leaks? In what cases does the... (4 Replies)
Discussion started by: shriashishpatil
4 Replies

2. UNIX for Advanced & Expert Users

Check memory leak

I am running c++ code on AIX unix.I have a doubt that my code is using some memory but it is not clearing that.Some time i am getting heap allocation problem.In my code i am not using any malloc,new functions also i am justing using pointers and arrays. Is there any way i can find out if the... (2 Replies)
Discussion started by: ukatru
2 Replies

3. UNIX for Advanced & Expert Users

Memory leak while using pthread_cancel()

I tried to execute a sample pthread program to cancel a newly created one using pthread_cancel(). but using valgrind on my code shows some memory leak. My Code: #include "iostream" #include "unistd.h" #include "pthread.h" #include "signal.h" using namespace std; void handler(int); void*... (4 Replies)
Discussion started by: kcr
4 Replies

4. Programming

Memory LEAK with pthreads

I have this code... #include <stdio.h> #include <iostream> #include <pthread.h> static void* cliente(void *datos); int main() { pthread_attr_t tattr; int ret; size_t size = PTHREAD_STACK_MIN + 0x0100; ret = pthread_attr_init(&tattr); ret =... (8 Replies)
Discussion started by: JEscola
8 Replies

5. UNIX for Advanced & Expert Users

Memory leak in pthread

helo frnds, I am using RHEL5 and C lang for development. I am getting some memory leak problem in pthread. I hav developed a program which creates two threads for listening purpose on two diff ports. both the child threads are doing same job but on diff port no. I am using... (4 Replies)
Discussion started by: mindTeaser
4 Replies

6. UNIX for Advanced & Expert Users

Need to create a memory leak

Hi. This might be a strange request, but does anyone have any idea on a simple shell script that would use more and more memory as it ran? Like a purposeful leak. I want to test the behaviour of an already running program when the machine runs out of memory. Thanks! (4 Replies)
Discussion started by: rebelbuttmunch
4 Replies

7. IP Networking

memory leak?

Hi All, my client server application can work in two modes: 1) one direction - only client sends msgs to server 2) two directions - server gives 'answers' to client. when program run in the first mode it looks OK, but when server answers to client than client's application exit its... (2 Replies)
Discussion started by: lenna
2 Replies

8. Programming

Memory Leak

Hi, I am trying a database server which keeps a B+ plus tree structure and works on it. I am trying to find the memory used/leak while executing this process. I check the memory leak by using ps uax command. When i execute a delete query i am sure that my code frees up the existing... (9 Replies)
Discussion started by: kumaran_5555
9 Replies

9. Red Hat

Memory leak

Hi all I am using RED HAT 5.4, and i am getting memory uses problem. when i use "sync;echo 3 > /proc/sys/vm/drop_cache" command the memory will release after 2,3 hour memory show 95%. pls suggest right way. thanks (37 Replies)
Discussion started by: reply.ravi
37 Replies
NUMA(7) 						     Linux Programmer's Manual							   NUMA(7)

NAME
numa - overview of Non-Uniform Memory Architecture DESCRIPTION
Non-Uniform Memory Access (NUMA) refers to multiprocessor systems whose memory is divided into multiple memory nodes. The access time of a memory node depends on the relative locations of the accessing CPU and the accessed node. (This contrasts with a symmetric multiprocessor system, where the access time for all of the memory is the same for all CPUs.) Normally, each CPU on a NUMA system has a local memory node whose contents can be accessed faster than the memory in the node local to another CPU or the memory on a bus shared by all CPUs. NUMA system calls The Linux kernel implements the following NUMA-related system calls: get_mempolicy(2), mbind(2), migrate_pages(2), move_pages(2), and set_mempolicy(2). However, applications should normally use the interface provided by libnuma; see "Library Support" below. /proc/[number]/numa_maps (since Linux 2.6.14) This file displays information about a process's NUMA memory policy and allocation. Each line contains information about a memory range used by the process, displaying--among other information--the effective memory policy for that memory range and on which nodes the pages have been allocated. numa_maps is a read-only file. When /proc/<pid>/numa_maps is read, the kernel will scan the virtual address space of the process and report how memory is used. One line is displayed for each unique memory range of the process. The first field of each line shows the starting address of the memory range. This field allows a correlation with the contents of the /proc/<pid>/maps file, which contains the end address of the range and other information, such as the access permissions and sharing. The second field shows the memory policy currently in effect for the memory range. Note that the effective policy is not necessarily the policy installed by the process for that memory range. Specifically, if the process installed a "default" policy for that range, the effective policy for that range will be the process policy, which may or may not be "default". The rest of the line contains information about the pages allocated in the memory range, as follows: N<node>=<nr_pages> The number of pages allocated on <node>. <nr_pages> includes only pages currently mapped by the process. Page migration and memory reclaim may have temporarily unmapped pages associated with this memory range. These pages may show up again only after the process has attempted to reference them. If the memory range represents a shared memory area or file mapping, other processes may currently have additional pages mapped in a corresponding memory range. file=<filename> The file backing the memory range. If the file is mapped as private, write accesses may have generated COW (Copy-On-Write) pages in this memory range. These pages are displayed as anonymous pages. heap Memory range is used for the heap. stack Memory range is used for the stack. huge Huge memory range. The page counts shown are huge pages and not regular sized pages. anon=<pages> The number of anonymous page in the range. dirty=<pages> Number of dirty pages. mapped=<pages> Total number of mapped pages, if different from dirty and anon pages. mapmax=<count> Maximum mapcount (number of processes mapping a single page) encountered during the scan. This may be used as an indicator of the degree of sharing occurring in a given memory range. swapcache=<count> Number of pages that have an associated entry on a swap device. active=<pages> The number of pages on the active list. This field is shown only if different from the number of pages in this range. This means that some inactive pages exist in the memory range that may be removed from memory by the swapper soon. writeback=<pages> Number of pages that are currently being written out to disk. CONFORMING TO
No standards govern NUMA interfaces. NOTES
The Linux NUMA system calls and /proc interface are available only if the kernel was configured and built with the CONFIG_NUMA option. Library support Link with -lnuma to get the system call definitions. libnuma and the required <numaif.h> header are available in the numactl package. However, applications should not use these system calls directly. Instead, the higher level interface provided by the numa(3) functions in the numactl package is recommended. The numactl package is available at <ftp://oss.sgi.com/www/projects/libnuma/download/>. The package is also included in some Linux distributions. Some distributions include the development library and header in the separate numactl-devel package. SEE ALSO
get_mempolicy(2), mbind(2), move_pages(2), set_mempolicy(2), numa(3), cpuset(7), numactl(8) COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2012-08-05 NUMA(7)
All times are GMT -4. The time now is 09:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy