Compare commits
No commits in common. "9c746a10cf8604d9d1317db8c40b1d513ee1515e" and "d5922a00913240d541cc7a3faa397bffcb9856dd" have entirely different histories.
9c746a10cf
...
d5922a0091
2 changed files with 2 additions and 4 deletions
2
Makefile
2
Makefile
|
@ -6,7 +6,7 @@ CFLAGS += -Wno-unused-variable -Wno-unused-function
|
||||||
CFLAGS += -Wno-unused-but-set-variable -Wno-unused-value -Wno-unused-label
|
CFLAGS += -Wno-unused-but-set-variable -Wno-unused-value -Wno-unused-label
|
||||||
CFLAGS += -Wno-unused-result -Wno-unused-const-variable
|
CFLAGS += -Wno-unused-result -Wno-unused-const-variable
|
||||||
|
|
||||||
ifneq ($(DEBUG), 1)
|
ifeq ($(RELEASE), 1)
|
||||||
CFLAGS += -fno-exceptions -fno-asynchronous-unwind-tables -fno-ident
|
CFLAGS += -fno-exceptions -fno-asynchronous-unwind-tables -fno-ident
|
||||||
CFLAGS += -fno-unwind-tables -fno-stack-protector -fno-plt -fno-pic
|
CFLAGS += -fno-unwind-tables -fno-stack-protector -fno-plt -fno-pic
|
||||||
CFLAGS += -O3 -std=c99 -march=native -mtune=native -fomit-frame-pointer
|
CFLAGS += -O3 -std=c99 -march=native -mtune=native -fomit-frame-pointer
|
||||||
|
|
|
@ -24,12 +24,10 @@ rb_init(struct RingBuf *rb, rb_size_t capacity, ALLOC_T malloc_fn,
|
||||||
rb->write_head = rb->buffer;
|
rb->write_head = rb->buffer;
|
||||||
rb->read_head = rb->buffer;
|
rb->read_head = rb->buffer;
|
||||||
|
|
||||||
|
// Read from buffer at max position to force a segfault if theres an issue
|
||||||
DEBUG_PRINT("Reading from buffer at position %d\n",
|
DEBUG_PRINT("Reading from buffer at position %d\n",
|
||||||
rb->capacity * rb->struct_size);
|
rb->capacity * rb->struct_size);
|
||||||
|
|
||||||
// Read from buffer at max position to force a segfault if theres an issue
|
|
||||||
void *top = rb->buffer + (rb->capacity * rb->struct_size);
|
void *top = rb->buffer + (rb->capacity * rb->struct_size);
|
||||||
|
|
||||||
DEBUG_PRINT("Buffer top successfully read at virtual address: %p\n", &top);
|
DEBUG_PRINT("Buffer top successfully read at virtual address: %p\n", &top);
|
||||||
|
|
||||||
DEBUG_PRINT(
|
DEBUG_PRINT(
|
||||||
|
|
Loading…
Add table
Reference in a new issue