林信閔

@andy78644

Joined on Nov 18, 2018

  • contributed by < andy78644 > 程式運作原理 struct #define STRUCT_BODY(type) \ struct { \ size_t size : 54, on_heap : 1, capacity : 6, flag1 : 1, flag2 : 1, \ flag3 : 1; \ type *ptr; \ }
     Like  Bookmark
  • contributed by < andy78644 > 程式運作原理 typedef struct __node { int value; struct __node *next; } node_t; static inline void list_add_node_t(node_t **list, node_t *node_t) { node_t->next = *list;
     Like  Bookmark
  • contributed by < andy78644 > 程式原理 首先可以先看到 xs 的結構 總共可以放入 15 個 byte 大小的字串,其中如果字串小於 15 byte 則放入 stack ,如果超過 15 bytes 則會放入 heap typedef union { /* allow strings up to 15 bytes to stay on the stack * use the last byte as a null terminator and to store flags * much like fbstring:
     Like  Bookmark
  • contributed by < andy78644 > Q1 程式運作原理 void list_merge_sort(queue_t *q) { if (list_is_singular(&q->list)) return; queue_t left;
     Like  Bookmark