Welcome to pickSourcecode.com Login | Register    
pickZy.com
 Home  | search  | games  | General  | C  | C++  | Java  | Php  | Networking  | Visual Basic  | VC++  | Win32  | MFC  | JavaScript  | Jobs  | Post jobs
Alloc mem using Macro
2009-12-07 |  RatheeshTR  | Viewed: 33  |    0


#define Alloc_Mem(type,name,size) \
   type *local_
##name=NULL; \
         type *name = local_
##name ? local_##name : \
                ( local_
##name = (type *)calloc(size, sizeof(type)) )

ICP_ARRAY(char, buf, ICP_MAX_BUF_SIZE);

Submitted By:
Prof: Software Engineer
Tech: C ,Cpp
Send Mail: ratheesh



Related topics
C - Access a Class Member Function Without Creating a Class Object
C - malloc, alloc, memory allocation c
C - Allocate 10 array locations dynamically and assign 0 - 9 integer values and reverse the array?
Alloc mem using Macro
Malloc Debugger
C program using System V shared memory segments in linux

Related References
c - c preprocessor, macro substitution
manage memory efficiently
writing to files using fwrite

Web site contents © Copyright 2007, All rights reserved.
Help | Terms and Conditions | Privacy Policy | About Us