usb: getting string descriptors, minor improvements
[quarnos.git] / resources / slob.h
blobff2caecfb43b56c3f4cf522b6a4b5c6849b5e45b
1 #ifndef _SLOB_H_
2 #define _SLOB_H_
4 #include "memm.h"
5 #include "physmem.h"
6 #include "arch/low/general.h"
8 namespace resources {
9 class slob : public memm {
10 private:
11 p<physmem> physical;
13 struct unit {
14 unsigned int size;
15 unit *next;
18 unit *first_block;
20 bool merge(unit *ptr);
21 public:
22 slob();
24 virtual void *allocate_space(unsigned int size);
25 virtual void deallocate_space(void *ptr);
27 virtual unsigned int get_size(void *ptr) const;
29 static void register_type();
33 #endif