Browse Source

Revert "malloc attribute changes"

wasn't meant for my local "master" branch ;)
This reverts commit 373022108b.
tags/v0.9.3
Holger Lubitz 17 years ago
parent
commit
7815474495
3 changed files with 2 additions and 10 deletions
  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 View File

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

+ 0
- 4
src/core/malloc.c View File

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

+ 2
- 4
src/crypto/cryptoLayer.h View File

31
 
31
 
32
 #define sslAssert( ... ) assert ( __VA_ARGS__ )
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
 psMalloc ( psPool_t *pool __unused, size_t len ) {
35
 psMalloc ( psPool_t *pool __unused, size_t len ) {
37
 	return malloc ( len );
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
 psRealloc ( void *ptr, size_t len ) {
40
 psRealloc ( void *ptr, size_t len ) {
43
 	return realloc ( ptr, len );
41
 	return realloc ( ptr, len );
44
 }
42
 }

Loading…
Cancel
Save