yesterday I had posted a question: How should I pass a pointer to a function and allocate memory for the passed pointer from inside the called function?
I\'ve written a C program to extract files from a tar archive using libarchive. I\'d like to extract a file from this archive and print it to standard output.But I get extra characters.It\'s garbage,
I would like to use OpenBSD\'s implementation of malloc, realloc and free on my Debian lenny desktop rather than glibc\'s.
I need help with malloc() inside another function. I\'m passing a pointer and size to the function from my main() and I would like to allocate memory for that pointer dynamically using malloc() from
Somebody told me that allocating with malloc is not secure anymore, I\'m not a C/C++ guru but I\'ve made some stuff with malloc and C/C++. Does anyone know about what risks I\'m into?
Lets say I have the following: CHARLINK * _init_link(CHARLINK **link) { short i; (*link)->cl = (CHARLINK **) calloc(NUM_CHARS, sizeof(CHARLINK *));
A part of an application I\'m working on is a simple pthread-based server that communicates over a TCP/IP socket. I am writing it in C because it\'s going to be running in a memory constrained environ
I\'m making a thread class to use as a wrapper for pthreads. I have a Queue class to use as a开发者_JAVA技巧 queue, but I\'m having trouble with it. It seems to allocate and fill the queue struct fine
I was trying to figure out how much memory I can malloc to maximum extent on my machine (1 Gb RAM 160 Gb HD Windows platform).
I need to answer a basic question from inside my C program compiled by GCC for Linux: how much of process heap is currently in use (allocated by malloc) and how much resides if free heap blocks. GNU i