Skip to content

Commit

Permalink
Add and use xmalloc wrapper to fail on oom.
Browse files Browse the repository at this point in the history
Memory is only allocated at configuration time, so recovery
isn't possible here.
  • Loading branch information
niklata committed Feb 14, 2024
1 parent 2d2ed32 commit 521b265
Show file tree
Hide file tree
Showing 6 changed files with 119 additions and 101 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
NCRON_C_SRCS = $(sort nk/io.c nk/pspawn.c)
NCRON_C_SRCS = $(sort xmalloc.c nk/io.c nk/pspawn.c)
NCRON_CXX_SRCS = $(sort ncron.cpp sched.cpp crontab.cpp)
NCRON_OBJS = $(NCRON_C_SRCS:.c=.o) $(NCRON_CXX_SRCS:.cpp=.o)
NCRON_DEP = $(NCRON_C_SRCS:.c=.d) $(NCRON_CXX_SRCS:.cpp=.d)
Expand Down
Loading

0 comments on commit 521b265

Please sign in to comment.