05-20-2009
Write a small C program which continuously loops and mallocs a chuck of memory each time.
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
Today, I wrote a test code for fork/execvp/waitpid. In the parent process, it fork 100 child processes which only execute "date" to print the current datetime. When any child process die, the parent process will receive a SIGCHLD signal. Then, the parent process will re-fork-execvp the child... (7 Replies)
Discussion started by: whererush
7 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
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
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. Web Development
Hi
We have just got a dedicated server with Fasthosts, O/S is Linux CentOS 6 64 bit.
It was a fresh install and I have just moved one WordPress site onto there.
The problem is we seem to be getting a memory leak (that's what Fasthosts said) and the database (I think) keeps crashing, so we... (3 Replies)
Discussion started by: Pokeyzx
3 Replies
LEARN ABOUT MOJAVE
memchan
memchan(n) memchan(n)
__________________________________________________________________________________________________________________________________________________
NAME
memchan - Create and manipulate memory channels
SYNOPSIS
package require Tcl
package require memchan
memchan ?-initial-size len?
_________________________________________________________________
DESCRIPTION
This manpage documents both the overall package and the command memchan. The package itself provides a number of in-memory channels which
can utilized to
o capture stream-like information in a natural way instead of using set and append to manipulate strings
o or to transfer data between interpreters, in the same thread or not.
COMMAND
memchan ?-initial-size len?
creates a chunk-oriented in-memory channel and returns its handle. If an initial size is specified the system will pre-allocate len
bytes of buffer space for the contents. This is no restriction on the ultimate size of the channel, it will always grow as much as
is necessary to accomodate the data written into it.
The channels created here can be transfered between interpreters in the same thread and between threads, but only as a whole. It is
not possible to use them to create a bi- or unidirectional connection between two interpreters.
Memory channels created by memchan provide two read-only options which can be queried via the standard fconfigure command. These are
-length
The value of this option is the number of bytes currently stored in the queried memory channel.
-allocated
The value of this option is the number of bytes currently allocated by the queried memory channel. This number is at least as big as
the value of -length.
As the channels generated by memchan grow as necessary they are always writable. This means that a writable fileevent-handler will fire
continuously.
The channels are also readable if they contain more than zero bytes and the seek location is not and the end of the channel. Under these
conditions a readable fileevent-handler will fire continuously.
Note that writing to such a channel usually occurs at the end, thus supressing readable events. This also means that users have to take
care to seek the channel to a location before the end before trying to read data back.
SEE ALSO
fifo, fifo2, null, random, zero
KEYWORDS
channel, chunk, i/o, in-memory channel, memchan
COPYRIGHT
Copyright (c) 1996-2003 Andreas Kupries <andreas_kupries@users.sourceforge.net>
Memory channels 2.2 memchan(n)