浏览代码

Use shared symbols for heap_ptr and heap_end

tags/v0.9.3
Michael Brown 19 年前
父节点
当前提交
3ce6504f14
共有 2 个文件被更改,包括 10 次插入1 次删除
  1. 1
    1
      src/core/heap.c
  2. 9
    0
      src/include/heap.h

+ 1
- 1
src/core/heap.c 查看文件

@@ -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 查看文件

@@ -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 */

正在加载...
取消
保存