mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-21 23:46:27 -05:00
Introduce nalloc_nofail
This commit is contained in:
parent
b297cbfa9b
commit
db3f5af65a
12 changed files with 43 additions and 39 deletions
|
|
@ -1021,10 +1021,10 @@ void io_init(struct snapraid_io* io, struct snapraid_state* state,
|
|||
io->reader_max = readers_count;
|
||||
io->writer_max = writers_count;
|
||||
|
||||
io->reader_map = malloc_nofail(sizeof(struct snapraid_worker) * io->reader_max);
|
||||
io->reader_list = malloc_nofail(sizeof(unsigned) * (io->reader_max + 1));
|
||||
io->writer_map = malloc_nofail(sizeof(struct snapraid_worker) * io->writer_max);
|
||||
io->writer_list = malloc_nofail(sizeof(unsigned) * (io->writer_max + 1));
|
||||
io->reader_map = nalloc_nofail(io->reader_max, sizeof(struct snapraid_worker));
|
||||
io->reader_list = nalloc_nofail(io->reader_max + 1, sizeof(unsigned));
|
||||
io->writer_map = nalloc_nofail(io->writer_max, sizeof(struct snapraid_worker));
|
||||
io->writer_list = nalloc_nofail(io->writer_max + 1, sizeof(unsigned));
|
||||
|
||||
io->data_base = 0;
|
||||
io->data_count = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue