02-03-2009
I don't see any memory allocation/deallocation here. And since you're not using C++ specific constructs (except comments), try compiling with just C.
9 More Discussions You Might Find Interesting
1. Programming
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. Programming
Hi all!
I am implementing an http server in c++ using the posix thread, but i am having a memory leak and i cannot find the reason.
I have already commented out the section that initializes the threads and i found out, the problem is when i initialize/run the threads.
In the threads i have... (1 Reply)
Discussion started by: laurovalente
1 Replies
3. UNIX for Advanced & Expert Users
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
4. UNIX for Advanced & Expert Users
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
5. IP Networking
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
6. Programming
hi all
Can any one plz explain me about memory leak problem
Thankx (5 Replies)
Discussion started by: sonali
5 Replies
7. Programming
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
8. Red Hat
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
9. Programming
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
LEARN ABOUT OPENSOLARIS
setddent
getddent(3BSM) Security and Auditing Library Functions getddent(3BSM)
NAME
getddent, getddnam, setddent, endddent, setddfile - get device_deallocate entry
SYNOPSIS
cc [flag]... file... -lbsm [library]...
#include <bsm/devices.h>
devdealloc_t *getddent(void);
devdealloc_t *getddnam(char *name);
void setddent(void);
void endddent(void);
void setddfile(char *file);
DESCRIPTION
The getddent() and getddnam() functions each return a device_deallocate entry. The getddent() function enumerates all device_deallocate
entries. Successive calls to this function return either successive device_deallocate entries or NULL. The getddnam() function searches for
a device_deallocate entry with a given device name.
The internal representation of a device_deallocate entry is a devdealloc_t structure defined in <bsm/devices.h> with the following members:
char *dd_devname; /* device allocation name */
char *dd_logout; /* deallocation action on user logout */
char *dd_boot; /* deallocation action on system boot */
The setddent() function "rewinds" to the beginning of the enumeration of device_deallocate entries. Calls to getddnam() may leave the enu-
meration in an indeterminate state, so setddent() should be called before the first call to getddent().
The endddent() function can be called to indicate that device_deallocate processing is complete. The library can then close any opende-
vice_deallocate file, deallocate any internal storage, and so forth.
The setddfile() function changes the pathname used by the other functions for opening the device_deallocate file, allowing use of
device_deallocate files other than the default file, /etc/security/device_deallocate.
RETURN VALUES
The getddent() function returns a pointer to a devdealloc_t if it successfully enumerates an entry. Otherwise it returns NULL, indicating
the end of the enumeration.
The getddnam() function returns a pointer to a devdealloc_t if it successfully locates the requested entry. Otherwise it returns NULL.
FILES
/etc/security/device_deallocate
Administrative file defining parameters for device deallocation.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|MT-Level |Unsafe |
+-----------------------------+-----------------------------+
SEE ALSO
free(3C), attributes(5)
NOTES
The getddent() and getddnam() functions allocate memory for the pointers they return. This memory can be deallocated with the free(3C)
function.
SunOS 5.11 11 Jan 2001 getddent(3BSM)