Browse Source

Use shared symbols for heap_ptr and heap_end

tags/v0.9.3
Michael Brown 19 years ago
parent
commit
3ce6504f14
2 changed files with 10 additions and 1 deletions
  1. 1
    1
      src/core/heap.c
  2. 9
    0
      src/include/heap.h

+ 1
- 1
src/core/heap.c View File

13
 extern char _text[];
13
 extern char _text[];
14
 extern char _end[];
14
 extern char _end[];
15
 
15
 
16
-static physaddr_t heap_start, heap_end, heap_ptr;
16
+static physaddr_t heap_start;
17
 
17
 
18
 /*
18
 /*
19
  * Find the largest contiguous area of memory that I can use for the
19
  * Find the largest contiguous area of memory that I can use for the

+ 9
- 0
src/include/heap.h View File

80
 	efree ( ptr );
80
 	efree ( ptr );
81
 }
81
 }
82
 
82
 
83
+/*
84
+ * Heap markers.  osloader.c and other code may wish to know the heap
85
+ * location, without necessarily wanting to drag in heap.o.  We
86
+ * therefore declare these as shared (i.e. common) symbols.
87
+ *
88
+ */
89
+physaddr_t heap_ptr __asm__ ( "_shared_heap_ptr" );
90
+physaddr_t heap_end __asm__ ( "_shared_heap_end" );
91
+
83
 #endif /* HEAP_H */
92
 #endif /* HEAP_H */

Loading…
Cancel
Save