Move ov000 documentation from Ghidra

This commit is contained in:
Aetias
2025-01-19 11:58:47 +01:00
parent 4c60dda140
commit e1d2f0b168
25 changed files with 338 additions and 221 deletions
+11
View File
@@ -0,0 +1,11 @@
#pragma once
#include <stddef.h>
namespace __cxxabiv1 {
extern "C" {
typedef void (*__cxa_cdtor_type)(void *);
void __cxa_vec_cleanup(void *array, size_t count, size_t elementSize, __cxa_cdtor_type dtor);
}
} // namespace __cxxabiv1
+33 -3
View File
@@ -1,10 +1,40 @@
#pragma once
#include <string.h>
namespace std {
template <class T> class vector {
public:
T *elements;
int size;
int capacity;
T *mElements;
int mSize;
int mCapacity;
~vector() {
if (mElements != NULL) {
decrease_size(mSize);
delete mElements;
}
}
void push_back(T &value) {
get_new_capacity(1);
append_back(1, &value);
}
T *erase(T *first, T *last) {
if (first != last) {
int bytesToMove = (int) mElements + mSize * sizeof(T) - (int) last;
memmove(first, last, bytesToMove);
mSize -= (int) last - (int) first;
}
return first;
}
private:
void decrease_size(int amount);
int get_new_capacity(int growth);
void append_back(int length, T *items);
};
} // namespace std