05-12-2009
Did you try it as a C program?
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. Programming
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
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
pthread_cancel
PTHREAD_CANCEL(3) BSD Library Functions Manual PTHREAD_CANCEL(3)
NAME
pthread_cancel -- cancel execution of a thread
SYNOPSIS
#include <pthread.h>
int
pthread_cancel(pthread_t thread);
DESCRIPTION
The pthread_cancel() function requests that thread be canceled. The target thread's cancelability state and type determines when the cancel-
lation takes effect. When the cancellation is acted on, the cancellation cleanup handlers for thread are called. When the last cancellation
cleanup handler returns, the thread-specific data destructor functions will be called for thread. When the last destructor function returns,
thread will be terminated.
The cancellation processing in the target thread runs asynchronously with respect to the calling thread returning from pthread_cancel().
A status of PTHREAD_CANCELED is made available to any threads joining with the target. The symbolic constant PTHREAD_CANCELED expands to a
constant expression of type (void *), whose value matches no pointer to an object in memory nor the value NULL.
RETURN VALUES
If successful, the pthread_cancel() functions will return zero. Otherwise an error number will be returned to indicate the error.
ERRORS
The pthread_cancel() function will fail if:
[ESRCH] No thread could be found corresponding to that specified by the given thread ID.
SEE ALSO
pthread_cleanup_pop(3), pthread_cleanup_push(3), pthread_exit(3), pthread_join(3), pthread_setcancelstate(3), pthread_setcanceltype(3),
pthread_testcancel(3)
STANDARDS
The pthread_cancel() function conforms to ISO/IEC 9945-1:1996 (``POSIX.1'').
AUTHORS
This manual page was written by David Leonard <d@openbsd.org> for the OpenBSD implementation of pthread_cancel().
BSD
January 17, 1999 BSD