Skip to content

Commit

Permalink
Ensure our enumerations only use the size of a char
Browse files Browse the repository at this point in the history
We are currently wasting a lot of space by writing enumerations as full
blown integers, where we could force them to have only 1 byte as we are
not using values bigger than 255.

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
  • Loading branch information
pablogsal authored and godlygeek committed Apr 25, 2022
1 parent 4c460ae commit aa0bead
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/memray/_memray/hooks.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ struct SymbolHook
void
ensureAllHooksAreValid();

enum class Allocator {
enum class Allocator : unsigned char {
MALLOC = 1,
FREE = 2,
CALLOC = 3,
Expand Down

0 comments on commit aa0bead

Please sign in to comment.