@@ -45,12 +45,12 @@ Now you can say things like:
4545#define ALLOC
4646#endif /*ALLOC*/
4747
48- /* chop up big block into linked list of small blocks */
49- Freelist * /* return 0 for failure */
50- create_freelist ( flh , bytes )
51- struct freelist_head * flh ; /* freelist head */
52- int bytes ; /* new memory size */
53- {
48+ /** chop up big block into linked list of small blocks
49+ * return 0 for failure
50+ * \param flh freelist head
51+ * \param bytes new memory size
52+ */
53+ Freelist * create_freelist ( struct freelist_head * flh , int bytes ) {
5454 Freelist * current = ( Freelist * )malloc ( bytes );
5555 if ( current == 0 ) {
5656 return ( 0 );
@@ -82,14 +82,13 @@ _MEMinitialize() {
8282 malloc_debug ( 2 );
8383#endif
8484}
85-
86- void
87- MEMinitialize ( flh , size , alloc1 , alloc2 )
88- struct freelist_head * flh ;
89- int size ; /* size of a single element */
90- int alloc1 ; /* number to allocate initially */
91- int alloc2 ; /* number to allocate if we run out */
92- {
85+ /**
86+ * \param flh freelist head
87+ * \param size size of a single element
88+ * \param alloc1 number to allocate initially
89+ * \param alloc2 number to allocate if we run out
90+ */
91+ void MEMinitialize ( struct freelist_head * flh , int size , int alloc1 , int alloc2 ) {
9392 flh -> size_elt = size ; /* kludge for calloc-like behavior */
9493#ifndef NOSTAT
9594 flh -> alloc = flh -> dealloc = flh -> create = 0 ;
@@ -116,10 +115,7 @@ int alloc2; /* number to allocate if we run out */
116115#endif
117116}
118117
119- Generic
120- MEM_new ( flh )
121- struct freelist_head * flh ;
122- {
118+ Generic MEM_new ( struct freelist_head * flh ) {
123119 Generic obj ;
124120
125121#ifndef NOSTAT
@@ -154,11 +150,7 @@ struct freelist_head * flh;
154150#endif
155151}
156152
157- void
158- MEM_destroy ( flh , link )
159- struct freelist_head * flh ;
160- Freelist * link ;
161- {
153+ void MEM_destroy ( struct freelist_head * flh , Freelist * link ) {
162154#ifndef NOSTAT
163155 flh -> dealloc ++ ;
164156#endif
0 commit comments