Przeglądaj źródła

Revert "malloc attribute changes"

wasn't meant for my local "master" branch ;)
This reverts commit 373022108b.
tags/v0.9.3
Holger Lubitz 17 lat temu
rodzic
commit
7815474495
3 zmienionych plików z 2 dodań i 10 usunięć
  1. 0
    2
      src/arch/i386/core/umalloc.c
  2. 0
    4
      src/core/malloc.c
  3. 2
    4
      src/crypto/cryptoLayer.h

+ 0
- 2
src/arch/i386/core/umalloc.c Wyświetl plik

@@ -135,7 +135,6 @@ static void ecollect_free ( void ) {
135 135
  * Calling realloc() with a new size of zero is a valid way to free a
136 136
  * memory block.
137 137
  */
138
-__attribute__ ((malloc))
139 138
 userptr_t urealloc ( userptr_t ptr, size_t new_size ) {
140 139
 	struct external_memory extmem;
141 140
 	userptr_t new = ptr;
@@ -209,7 +208,6 @@ userptr_t urealloc ( userptr_t ptr, size_t new_size ) {
209 208
  *
210 209
  * Memory is guaranteed to be aligned to a page boundary.
211 210
  */
212
-__attribute__ ((malloc))
213 211
 userptr_t umalloc ( size_t size ) {
214 212
 	return urealloc ( UNULL, size );
215 213
 }

+ 0
- 4
src/core/malloc.c Wyświetl plik

@@ -95,7 +95,6 @@ static char heap[HEAP_SIZE] __attribute__ (( aligned ( __alignof__(void *) )));
95 95
  *
96 96
  * @c align must be a power of two.  @c size may not be zero.
97 97
  */
98
-__attribute__ ((malloc))
99 98
 void * alloc_memblock ( size_t size, size_t align ) {
100 99
 	struct memory_block *block;
101 100
 	size_t align_mask;
@@ -249,7 +248,6 @@ void free_memblock ( void *ptr, size_t size ) {
249 248
  * Calling realloc() with a new size of zero is a valid way to free a
250 249
  * memory block.
251 250
  */
252
-__attribute__ ((malloc))
253 251
 void * realloc ( void *old_ptr, size_t new_size ) {
254 252
 	struct autosized_block *old_block;
255 253
 	struct autosized_block *new_block;
@@ -299,7 +297,6 @@ void * realloc ( void *old_ptr, size_t new_size ) {
299 297
  * Allocates memory with no particular alignment requirement.  @c ptr
300 298
  * will be aligned to at least a multiple of sizeof(void*).
301 299
  */
302
-__attribute__ ((malloc))
303 300
 void * malloc ( size_t size ) {
304 301
 	return realloc ( NULL, size );
305 302
 }
@@ -329,7 +326,6 @@ void free ( void *ptr ) {
329 326
  * This function name is non-standard, but pretty intuitive.
330 327
  * zalloc(size) is always equivalent to calloc(1,size)
331 328
  */
332
-__attribute__ ((malloc))
333 329
 void * zalloc ( size_t size ) {
334 330
 	void *data;
335 331
 

+ 2
- 4
src/crypto/cryptoLayer.h Wyświetl plik

@@ -31,14 +31,12 @@ typedef void psPool_t;
31 31
 
32 32
 #define sslAssert( ... ) assert ( __VA_ARGS__ )
33 33
 
34
-static inline __attribute__ (( always_inline )) __attribute__ ((malloc))
35
-void *
34
+static inline __attribute__ (( always_inline )) void *
36 35
 psMalloc ( psPool_t *pool __unused, size_t len ) {
37 36
 	return malloc ( len );
38 37
 }
39 38
 
40
-static inline __attribute__ (( always_inline )) __attribute__ ((malloc))
41
-void *
39
+static inline __attribute__ (( always_inline )) void *
42 40
 psRealloc ( void *ptr, size_t len ) {
43 41
 	return realloc ( ptr, len );
44 42
 }

Ładowanie…
Anuluj
Zapisz