Ver código fonte

use malloc attribute

tags/v0.9.3
Holger Lubitz 17 anos atrás
pai
commit
6f61e254dc
1 arquivos alterados com 3 adições e 3 exclusões
  1. 3
    3
      src/include/stdlib.h

+ 3
- 3
src/include/stdlib.h Ver arquivo

@@ -20,10 +20,10 @@ extern unsigned long strtoul ( const char *p, char **endp, int base );
20 20
  ****************************************************************************
21 21
  */
22 22
 
23
-extern void * malloc ( size_t size );
23
+extern void * __malloc malloc ( size_t size );
24 24
 extern void * realloc ( void *old_ptr, size_t new_size );
25 25
 extern void free ( void *ptr );
26
-extern void * zalloc ( size_t len );
26
+extern void * __malloc zalloc ( size_t len );
27 27
 
28 28
 /**
29 29
  * Allocate cleared memory
@@ -38,7 +38,7 @@ extern void * zalloc ( size_t len );
38 38
  * function in zalloc(), since in most cases @c nmemb will be 1 and
39 39
  * doing the multiply is just wasteful.
40 40
  */
41
-static inline void * calloc ( size_t nmemb, size_t size ) {
41
+static inline void * __malloc calloc ( size_t nmemb, size_t size ) {
42 42
 	return zalloc ( nmemb * size );
43 43
 }
44 44
 

Carregando…
Cancelar
Salvar