Skip to content

Commit

Permalink
mem: add slowdown for slow cpu simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewfala committed Jan 26, 2022
1 parent 9c2868f commit a9ce9f8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/fluent-bit/flb_mem.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#endif

#include <stdlib.h>
#include <unistd.h>

/*
* The following memory handling wrappers, aims to simplify the way to use
Expand All @@ -55,6 +56,8 @@ static inline ALLOCSZ_ATTR(1)
void *flb_malloc(const size_t size) {
void *aux;

usleep(2000);

if (size == 0) {
return NULL;
}
Expand Down

0 comments on commit a9ce9f8

Please sign in to comment.