malloc
when to malloc and when not to -- c programming
I have few issues regarding when to use malloc or in this case strdup. Below is the small function which I have stolen from internet.[详细]
2023-04-09 01:27 分类:问答How to design libraries written in ANSI C?
I want to develop a library with ANSI C. I have a string struct: struct libme_string { char* buffer; int length;[详细]
2023-04-08 22:34 分类:问答Malloc crashes in recursive function
I\'m currently coding an implementation of the Burrows-Wheeler Transform which requires sorting a (large) array. Since I want to parallelize parts of the code of a recursive sort function, I decided t[详细]
2023-04-08 16:41 分类:问答Good practice to free malloc's at program conclusion?
I have a simple program which reads a bunch of ini file settings in memory allocated dynamically (malloc), then does stuff in loops for a long time, then ends.When I run valgrind I see that the memory[详细]
2023-04-08 00:19 分类:问答What's the relation between malloc diagnostics and malloc related environment variables?
Here there\'s a list of environment variables about the malloc package: MallocStackLogging MallocStackLoggingNoCompact[详细]
2023-04-07 18:38 分类:问答what point do c libraries get linked
Let\'s say I redefine malloc e.g. in a memory debugging program electric fence. electric fence says that one must link the library with the gcc -g -Wall -Wstrict-prototypes -lefence test.c. So my unde[详细]
2023-04-07 18:38 分类:问答Ternary Search Tree in C, Pointer to a Pointer to a struct problem
I\'m trying to build a ternary search tree for a school project. As far as I can tell, my code looks okay.[详细]
2023-04-07 02:13 分类:问答How to query string lengths with clGetPlatformInfo (and friends)?
Short version: Is there an official/correct way to query for the size of strings like CL_P开发者_高级运维LATFORM_VENDOR?[详细]
2023-04-06 05:18 分类:问答Efficiency of Malloc function in CUDA
I am trying to port some CPU codes into CUDA. My CUDA card is based on Fermi architecture, and therefore I can use the malloc() function in the device to dynamically allocate memory and don\'t need to[详细]
2023-04-06 03:38 分类:问答C : Static to dynamic allocation on multiple dimension array
I\'m currently stuck with a legacy code using multiple dimensions arrays : #define B 25 int Table[A][B][C][D][E][F];[详细]
2023-04-06 00:49 分类:问答