Debugger support improvement
[clinton/Virtual-Jaguar-Rx.git] / src / debugger / heapallocatorbrowser.h
CommitLineData
cf76e892 1//
570dad92 2// heapallocatorbrowser.h: Memory heap allocation
cf76e892 3//
570dad92 4// by Jean-Paul Mari
cf76e892
JPM
5//
6
7#ifndef __HEAPALLOCATORBROWSER_H__
8#define __HEAPALLOCATORBROWSER_H__
9
5d765b04 10
cf76e892
JPM
11#include <QtWidgets>
12#include <stdint.h>
13
5d765b04
JPM
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//
cf76e892
JPM
24class HeapAllocatorBrowserWindow: public QWidget
25{
26 Q_OBJECT
27
570dad92 28 typedef struct HeapAllocation
cf76e892 29 {
cf76e892 30 uint32_t nextalloc;
cf76e892 31 uint32_t size;
cf76e892
JPM
32 uint16_t used;
33 }S_HeapAllocation;
34
35 public:
36 HeapAllocatorBrowserWindow(QWidget *parent = 0);
37 ~HeapAllocatorBrowserWindow(void);
38
39 public slots:
cf76e892 40 void RefreshContents(void);
a2dfb8e5 41 void Reset(void);
cf76e892
JPM
42
43 protected:
a2dfb8e5 44 void keyPressEvent(QKeyEvent *);
cf76e892
JPM
45
46 private:
47 QVBoxLayout *layout;
cf76e892 48 QTextBrowser *text;
cf76e892 49 size_t Adr;
cf76e892
JPM
50};
51
52#endif // __HEAPALLOCATORBROWSER_H__