16 lines · 343 B · C
RawDownload
#include "sl.h" u32int *bitvector_resize(u32int *b, u64int oldsz, u64int newsz, bool zero){	u32int *p;	usize sz = ((newsz+31)>>5) * sizeof(u32int);	p = MEM_REALLOC(b, sz);	if(p == nil)		return nil;	if(zero && newsz > oldsz){		usize osz = ((oldsz+31)>>5) * sizeof(u32int);		memset(&p[osz/sizeof(u32int)], 0, sz-osz);	}	return p;}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t