Parcourir la source

Use shared symbols for heap_ptr and heap_end

tags/v0.9.3
Michael Brown il y a 19 ans
Parent
révision
3ce6504f14
2 fichiers modifiés avec 10 ajouts et 1 suppressions
  1. 1
    1
      src/core/heap.c
  2. 9
    0
      src/include/heap.h

+ 1
- 1
src/core/heap.c Voir le fichier

@@ -13,7 +13,7 @@ struct heap_block {
13 13
 extern char _text[];
14 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 19
  * Find the largest contiguous area of memory that I can use for the

+ 9
- 0
src/include/heap.h Voir le fichier

@@ -80,4 +80,13 @@ static inline void forget2 ( void *ptr ) {
80 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 92
 #endif /* HEAP_H */

Chargement…
Annuler
Enregistrer