kernel: remove calls to calloc (they confuse the tracker)
This commit is contained in:
parent
4aa3c4bbe0
commit
662ad3b407
@ -17,7 +17,8 @@
|
||||
|
||||
void bitset_init(bitset_t *set, size_t size) {
|
||||
set->size = CEIL(size, 8);
|
||||
set->data = calloc(set->size, 1);
|
||||
set->data = malloc(set->size);
|
||||
memset(set->data, 0, set->size);
|
||||
}
|
||||
|
||||
void bitset_free(bitset_t *set) {
|
||||
|
@ -204,7 +204,8 @@ void * module_load_direct(void * blob, size_t length) {
|
||||
*/
|
||||
if (!set && table->st_shndx == 65522) {
|
||||
if (!hashmap_get(symboltable, name)) {
|
||||
void * final = calloc(1, table->st_value);
|
||||
void * final = malloc(table->st_value);
|
||||
memset(final, 0, table->st_value);
|
||||
debug_print(NOTICE, "point %s to 0x%x", name, (uintptr_t)final);
|
||||
hashmap_set(symboltable, name, (void *)final);
|
||||
hashmap_set(local_symbols, name, (void *)final);
|
||||
|
@ -380,7 +380,8 @@ process_t * spawn_process(volatile process_t * parent, int reuse_fds) {
|
||||
|
||||
/* Allocate a new process */
|
||||
debug_print(INFO," process_t {");
|
||||
process_t * proc = calloc(sizeof(process_t),1);
|
||||
process_t * proc = malloc(sizeof(process_t));
|
||||
memset(proc, 0, sizeof(process_t));
|
||||
debug_print(INFO," }");
|
||||
proc->id = get_next_pid(); /* Set its PID */
|
||||
proc->group = proc->id; /* Set the GID */
|
||||
|
@ -827,7 +827,8 @@ static int mkdir_ext2(fs_node_t * parent, char * name, uint16_t permission) {
|
||||
write_inode(this, inode, inode_no);
|
||||
|
||||
uint8_t * tmp = malloc(this->block_size);
|
||||
ext2_dir_t * t = calloc(12,1);
|
||||
ext2_dir_t * t = malloc(12);
|
||||
memset(t, 0, 12);
|
||||
t->inode = inode_no;
|
||||
t->rec_len = 12;
|
||||
t->name_len = 1;
|
||||
@ -1544,7 +1545,8 @@ static fs_node_t * mount_ext2(fs_node_t * block_device, int flags) {
|
||||
if (!(this->flags & EXT2_FLAG_NOCACHE)) {
|
||||
debug_print(INFO, "Allocating cache...");
|
||||
DC = malloc(sizeof(ext2_disk_cache_entry_t) * this->cache_entries);
|
||||
this->cache_data = calloc(this->block_size, this->cache_entries);
|
||||
this->cache_data = malloc(this->block_size * this->cache_entries);
|
||||
memset(this->cache_data, 0, this->block_size * this->cache_entries);
|
||||
for (uint32_t i = 0; i < this->cache_entries; ++i) {
|
||||
DC[i].block_no = 0;
|
||||
DC[i].dirty = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user