fix: correct typos and improve comments across multiple files by codespell (#4116)

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
Huang Qi
2025-03-07 08:21:54 +08:00
committed by GitHub
parent 73998e4c85
commit 412631ac13
108 changed files with 215 additions and 215 deletions

View File

@ -40,7 +40,7 @@ hmu_is_in_heap(void *hmu, gc_uint8 *heap_base_addr, gc_uint8 *heap_end_addr)
* the node will be removed from the tree, and the left, right and
* parent pointers of the node @p will be set to be NULL. Other fields
* won't be touched. The tree will be re-organized so that the order
* conditions are still satisified.
* conditions are still satisfied.
*/
static bool
remove_tree_node(gc_heap_t *heap, hmu_tree_node_t *p)
@ -648,7 +648,7 @@ gc_realloc_vo_internal(void *vheap, void *ptr, gc_size_t size, const char *file,
hmu_old = obj_to_hmu(obj_old);
tot_size_old = hmu_get_size(hmu_old);
if (tot_size <= tot_size_old)
/* current node alreay meets requirement */
/* current node already meets requirement */
return obj_old;
}

View File

@ -115,7 +115,7 @@ gc_init_with_struct_and_pool(char *struct_buf, gc_size_t struct_buf_size,
char *pool_buf, gc_size_t pool_buf_size);
/**
* Destroy heap which is initilized from a buffer
* Destroy heap which is initialized from a buffer
*
* @param handle handle to heap needed destroy
*

View File

@ -287,7 +287,7 @@ typedef struct gc_heap_struct {
additional memory fails. When the fast mode fails, the
marking process can still be done in the slow mode, which
doesn't need additional memory (by walking through all
blocks and marking sucessors of marked nodes until no new
blocks and marking successors of marked nodes until no new
node is marked). TODO: slow mode is not implemented. */
unsigned is_fast_marking_failed : 1;
@ -319,7 +319,7 @@ typedef struct gc_heap_struct {
* the nodes, a new space will be allocated from heap */
extra_info_node_t *extra_info_normal_nodes[EXTRA_INFO_NORMAL_NODE_CNT];
/* Used to store extra information such as finalizer for specified nodes, we
* introduce a seperate space to store these information so only nodes who
* introduce a separate space to store these information so only nodes who
* really require extra information will occupy additional memory spaces. */
extra_info_node_t **extra_info_nodes;
gc_size_t extra_info_node_cnt;

View File

@ -9,7 +9,7 @@
/**
* Set default value to prefix and suffix
* @param hmu should not be NULL and should have been correctly initilized
* @param hmu should not be NULL and should have been correctly initialized
* (except prefix and suffix part)
* @param tot_size is offered here because hmu_get_size can not be used
* till now. tot_size should not be smaller than OBJ_EXTRA_SIZE.

View File

@ -232,7 +232,7 @@ gc_migrate(gc_handle_t handle, char *pool_buf_new, gc_size_t pool_buf_size)
heap_max_size = (uint32)(pool_buf_end - base_addr_new) & (uint32)~7;
if (pool_buf_end < base_addr_new || heap_max_size < heap->current_size) {
LOG_ERROR("[GC_ERROR]heap migrate invlaid pool buf size\n");
LOG_ERROR("[GC_ERROR]heap migrate invalid pool buf size\n");
return GC_ERROR;
}