3 #include "util/MessageSystem.h"
4 #include "artisan/gviewport/RectObject.h"
6 DataStore::DataStore() {
7 m_data
= new Artisan::GViewport::Data();
10 DataStore::~DataStore() {
14 void DataStore::process(Comm::Packet
*packet
) {
15 uint8_t type
= packet
->data()[0];
17 if(type
== 0) Message(Warning
, "Unknown memory packet type . . .");
19 Message(Debug
, "calloc() packet . . .");
22 uint64_t *data
= reinterpret_cast<uint64_t *>(packet
->data() + 1);
23 Message(Debug
, "malloc() packet . . .");
24 uint64_t timestamp
= data
[0];
25 uint64_t address
= data
[1];
26 uint64_t size
= data
[2];
27 Artisan::GViewport::Object
*object
= new Artisan::GViewport::RectObject(
28 Artisan::GViewport::Rect(timestamp
, -1, address
, address
+size
));
29 m_data
->addObject(object
);
32 Message(Debug
, "free() packet . . .");
35 Message(Debug
, "realloc() packet . . .");