/* * linux/compr_mm.h * * Memory management for pre-boot and ramdisk uncompressors * * Authors: Alain Knaff <alain@knaff.lu> * */ #ifndef DECOMPR_MM_H #define DECOMPR_MM_H #ifdef STATIC /* Code active when included from pre-boot environment: */ /* * Some architectures want to ensure there is no local data in their * pre-boot environment, so that data can arbitrarily relocated (via * GOT references). This is achieved by defining STATIC_RW_DATA to * be null. */ #ifndef STATIC_RW_DATA #define STATIC_RW_DATA static #endif /* A trivial malloc implementation, adapted from * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994 */ STATIC_RW_DATA unsigned long malloc_ptr; STATIC_RW_DATA int malloc_count;
static void *malloc(int size) { void *p; if (size < 0) return NULL; if (!malloc_ptr) malloc_ptr = free_mem_ptr; malloc_ptr = (malloc_ptr + 3) & ~3; /* Align */ p = (void *)malloc_ptr; malloc_ptr += size; if (free_mem_end_ptr && malloc_ptr >= free_mem_end_ptr) return NULL; malloc_count++; return p; }Contributors
Person | Tokens | Prop | Commits | CommitProp |
Alain Knaff | 67 | 91.78% | 1 | 50.00% |
Phillip Lougher | 6 | 8.22% | 1 | 50.00% |
Total | 73 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Alain Knaff | 22 | 100.00% | 1 | 100.00% |
Total | 22 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Alain Knaff | 186 | 89.86% | 1 | 20.00% |
Russell King | 11 | 5.31% | 1 | 20.00% |
Phillip Lougher | 6 | 2.90% | 1 | 20.00% |
Lasse Collin | 3 | 1.45% | 1 | 20.00% |
Lucas De Marchi | 1 | 0.48% | 1 | 20.00% |
Total | 207 | 100.00% | 5 | 100.00% |