Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

curs_memleaks(3x) [centos man page]

curs_memleaks(3X)														 curs_memleaks(3X)

NAME
_nc_freeall _nc_free_and_exit - curses memory-leak checking SYNOPSIS
#include <curses.h> void _nc_freeall(void); void _nc_free_and_exit(int); DESCRIPTION
These functions are used to simplify analysis of memory leaks in the ncurses library. They are normally not available; they must be con- figured into the library at build time using the --disable-leaks option. That compiles-in code that frees memory that normally would not be freed. Any implementation of curses must not free the memory associated with a screen, since (even after calling endwin), it must be available for use in the next call to refresh. There are also chunks of memory held for performance reasons. That makes it hard to analyze curses ap- plications for memory leaks. To work around this, one can build a debugging version of the ncurses library which frees those chunks which it can, and provides these functions to free all of the memory allocated by the ncurses library. The _nc_free_and_exit function is the preferred one since some of the memory which is freed may be required for the application to continue running. Its parameter is the code to pass to the exit routine. RETURN VALUE
These functions do not return a value. PORTABILITY
These functions are not part of the XSI interface. SEE ALSO
curses(3X). curs_memleaks(3X)

Check Out this Related Man Page

curs_memleaks(3X)														 curs_memleaks(3X)

NAME
_nc_freeall _nc_free_and_exit - curses memory-leak checking SYNOPSIS
#include <curses.h> void _nc_freeall(void); void _nc_free_and_exit(int); DESCRIPTION
These functions are used to simplify analysis of memory leaks in the ncurses library. They are normally not available; they must be con- figured into the library at build time using the --disable-leaks option. That compiles-in code that frees memory that normally would not be freed. Any implementation of curses must not free the memory associated with a screen, since (even after calling endwin), it must be available for use in the next call to refresh. There are also chunks of memory held for performance reasons. That makes it hard to analyze curses ap- plications for memory leaks. To work around this, one can build a debugging version of the ncurses library which frees those chunks which it can, and provides these functions to free all of the memory allocated by the ncurses library. The _nc_free_and_exit function is the preferred one since some of the memory which is freed may be required for the application to continue running. Its parameter is the code to pass to the exit routine. RETURN VALUE
These functions do not return a value. PORTABILITY
These functions are not part of the XSI interface. SEE ALSO
curses(3X). curs_memleaks(3X)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

memory leaks

Hi!! Experts, Any ideas how to check for the memory leaks in a process during performance testing?? I dont use purify.. Any way of finding it out using default S/W in HP UX-11 Can U gimme pointers to site having good scripts/tutorials on performance testing?? Thanx in Advance.. :) (3 Replies)
Discussion started by: jyotipg
3 Replies

2. UNIX for Dummies Questions & Answers

memory regain

When i first restart my computer memory usage is at 24% as the days months and evening pass it gets up to 80% and holds there sometime breaching 98%. Is there an command to regain the memory? Redhat 8 768 mb ram (6 Replies)
Discussion started by: macdonto
6 Replies

3. UNIX for Advanced & Expert Users

memory free up using 'find'

Hi, I am facing an interesting aspect of find command... to be clear, we are running a small web server with oracle 8i database and Oralce9iAS on Sun E250 with Solaris 2.6 Over a period of time, the free memory ( displayed in 'top' utility ) drops down.. we could relate this to dedicated... (6 Replies)
Discussion started by: shibz
6 Replies

4. Programming

Problem with curses library on Mac OS 10.2 darwin

Hello, I am trying to write a simple program with functions in the ncurses library, on a Mac running OSX 10.2.8, with the compiler and libraries that were included in the Dec 2002 Developer's tools release (the last one that runs on Jaguar, as far as I know). When I try to compile, I get... (2 Replies)
Discussion started by: marks
2 Replies

5. UNIX and Linux Applications

Looking for memory leaks freeware tools

Hello all Is there good free ware tools to check software memory leaks ? Some thing like purify on unix platforms sun/hp/linux Thanks (3 Replies)
Discussion started by: umen
3 Replies

6. Programming

how to check memory leak in C program under Unix

Hi, How to detect memory leak in C program under unix ? Thanks (6 Replies)
Discussion started by: useless79
6 Replies

7. 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

8. Programming

memory leak problem

hi all Can any one plz explain me about memory leak problem Thankx (5 Replies)
Discussion started by: sonali
5 Replies

9. HP-UX

Problem with memory leak

Hi, This is my 1st post here. I am facing a rather weired problem. I have a C++ binary running on HP-UX. The output of top as well as glance shows periodic increase in memory. But when i use gdb to detect it, i dont get the desired output...gdb says...no leaks found. Just to mention that I have... (2 Replies)
Discussion started by: kshk123
2 Replies

10. AIX

valgrind - pthread memory leaks on AIX

Hi all, I have written a small code just to invoke main and return immediately. When built with libpthread on AIX box, valgrind throws lots of memory leak errors. But when built without libpthread, no issues at all. Here is the sample run for your look. Any idea where I might be going wrong?... (3 Replies)
Discussion started by: visionofarun
3 Replies

11. Programming

strftime() creates memory leak

Hi, I am facing one strange situation while using strftime() to get current date and time in C. it leaks memory with %T strftime(L_StrDate,30,"%d-%b-%C%y %T", localtime((time_t *)&tv.tv_sec)) ; and when i use another option then no memory leak like strftime(L_StrDate,30,"%d-%b-%C%y ... (3 Replies)
Discussion started by: apskaushik
3 Replies

12. Programming

Help regarding memory leak in this C program

I have written this code in C which reads a very large collection of text files and does some processing. The problem with this code is that there are memory leaks which I am not able to figure out as to where the problem is. When I run this code, and see the memory usage using top command, then I... (7 Replies)
Discussion started by: shoaibjameel123
7 Replies

13. Linux

out of memory?

I had a situation where the server was basically unresponsive and apparently it was out of memory. I ran top and free commands and got the following outputs. I figured it was out of memory because there was no free swap left. But quite frankly I'm perplexed by this output, why does it appear that... (3 Replies)
Discussion started by: GKnight
3 Replies

14. Red Hat

Memory Issue

I could not find what is consuming the memory, generated DSET reports and NO hardware wise memory issue. 64 GB RAM on a server yet all I could see is a very limited memory available. I am not sure if I am reading this correct or not. I have used free -t -m and cat /proc/meminfo (results below)... (3 Replies)
Discussion started by: rsheikh01
3 Replies

15. UNIX for Beginners Questions & Answers

Ncurses status bar

Hi, all, I'm writing a BBS telnet client, and am trying to implement a status bar into it, at the bottom of the screen. I am using NCurses to accomplish this. So far, it appears to be working, that is, upon connecting to BBS, it will display the status bar, and then quickly disappear. ... (5 Replies)
Discussion started by: ignatius
5 Replies