Fix memory alignment
Fix SSE dependent classes not being properly aligned when created on the heap.
This commit is contained in:
parent
00c66d1bd1
commit
11ac2a3a52
|
@ -426,3 +426,13 @@ void CPUSideBar::drawStraightArrow(QPainter* painter, int x1, int y1, int x2, in
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void* CPUSideBar::operator new(size_t size)
|
||||||
|
{
|
||||||
|
return _aligned_malloc(size, 16);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CPUSideBar::operator delete(void* p)
|
||||||
|
{
|
||||||
|
_aligned_free(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,9 @@ public:
|
||||||
QSize sizeHint() const;
|
QSize sizeHint() const;
|
||||||
void drawStraightArrow(QPainter* painter, int x1, int y1, int x2, int y2);
|
void drawStraightArrow(QPainter* painter, int x1, int y1, int x2, int y2);
|
||||||
|
|
||||||
|
static void* operator new(size_t size);
|
||||||
|
static void operator delete(void* p);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void debugStateChangedSlot(DBGSTATE state);
|
void debugStateChangedSlot(DBGSTATE state);
|
||||||
void repaint();
|
void repaint();
|
||||||
|
|
|
@ -1289,6 +1289,16 @@ QSize RegistersView::sizeHint() const
|
||||||
return QSize(32 * mCharWidth , this->viewport()->height());
|
return QSize(32 * mCharWidth , this->viewport()->height());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void* RegistersView::operator new(size_t size)
|
||||||
|
{
|
||||||
|
return _aligned_malloc(size, 16);
|
||||||
|
}
|
||||||
|
|
||||||
|
void RegistersView::operator delete(void* p)
|
||||||
|
{
|
||||||
|
_aligned_free(p);
|
||||||
|
}
|
||||||
|
|
||||||
QString RegistersView::getRegisterLabel(REGISTER_NAME register_selected)
|
QString RegistersView::getRegisterLabel(REGISTER_NAME register_selected)
|
||||||
{
|
{
|
||||||
char label_text[MAX_LABEL_SIZE] = "";
|
char label_text[MAX_LABEL_SIZE] = "";
|
||||||
|
|
|
@ -94,6 +94,9 @@ public:
|
||||||
|
|
||||||
QSize sizeHint() const;
|
QSize sizeHint() const;
|
||||||
|
|
||||||
|
static void* operator new(size_t size);
|
||||||
|
static void operator delete(void* p);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void refreshShortcutsSlot();
|
void refreshShortcutsSlot();
|
||||||
void updateRegistersSlot();
|
void updateRegistersSlot();
|
||||||
|
|
Loading…
Reference in New Issue