b3521f099329fa0a6fe433345a0e2c722928037e
[clinton/Virtual-Jaguar-Rx.git] / src / debugger / heapallocatorbrowser.h
1 //
2 // heapallocatorbrowser.h: Memory heap allocation
3 //
4 // by Jean-Paul Mari
5 //
6
7 #ifndef __HEAPALLOCATORBROWSER_H__
8 #define __HEAPALLOCATORBROWSER_H__
9
10
11 #include <QtWidgets>
12 #include <stdint.h>
13
14
15 // Error code definitions
16 #define HA_NOERROR 0
17 #define HA_UNABLENEXTMEMORYALLOC 1
18 #define HA_UNABLEALLOCATEMEMORYUSAGE 2
19 #define HA_MEMORYBLOCKSIZEPROBLEM 3
20 #define HA_MEMORYALLOCATIONPROBLEM 4
21 #define HA_HAANDSPSHARESPACE 5
22
23 //
24 class HeapAllocatorBrowserWindow: public QWidget
25 {
26 Q_OBJECT
27
28 typedef struct HeapAllocation
29 {
30 uint32_t nextalloc;
31 uint32_t size;
32 uint16_t used;
33 }S_HeapAllocation;
34
35 public:
36 HeapAllocatorBrowserWindow(QWidget *parent = 0);
37 ~HeapAllocatorBrowserWindow(void);
38
39 public slots:
40 void RefreshContents(void);
41 void Reset(void);
42
43 protected:
44 void keyPressEvent(QKeyEvent *);
45
46 private:
47 QVBoxLayout *layout;
48 QTextBrowser *text;
49 size_t Adr;
50 };
51
52 #endif // __HEAPALLOCATORBROWSER_H__