Searched refs:capacity (Results 1 – 4 of 4) sorted by relevance
42 size_t capacity; member71 if (static_cast<size_t>(n) + space_for_null > ck->capacity - ck->offset) { in fmemopen_write()72 n = ck->capacity - ck->offset - space_for_null; in fmemopen_write()95 if (whence == SEEK_SET && (offset >= 0 && static_cast<size_t>(offset) <= ck->capacity)) { in fmemopen_seek()97 } else if (whence == SEEK_CUR && (ck->offset + offset <= ck->capacity)) { in fmemopen_seek()113 FILE* fmemopen(void* buf, size_t capacity, const char* mode) { in fmemopen() argument124 ck->capacity = capacity; in fmemopen()126 if (ck->buf == nullptr) ck->buf = ck->allocation = static_cast<char*>(calloc(capacity, 1)); in fmemopen()143 ck->size = strnlen(ck->buf, ck->capacity); in fmemopen()147 ck->size = capacity; in fmemopen()[all …]
102 size_t capacity = 0; // Number of char/wchar_t units allocated in `allocation`. in __svfscanf() local425 capacity = MIN(width, 32); in __svfscanf()426 allocation = wcp = reinterpret_cast<wchar_t*>(malloc(sizeof(wchar_t) * capacity)); in __svfscanf()459 if (allocation != nullptr && n == capacity) { in __svfscanf()460 capacity *= 2; in __svfscanf()462 reinterpret_cast<wchar_t*>(realloc(allocation, sizeof(wchar_t) * capacity)); in __svfscanf()499 capacity = MIN(width, 32); in __svfscanf()500 allocation = p = reinterpret_cast<char*>(malloc(capacity)); in __svfscanf()509 if (allocation != nullptr && n == capacity) { in __svfscanf()510 capacity *= 2; in __svfscanf()[all …]
76 static size_t round_up_to_page_bytes(size_t capacity) { in round_up_to_page_bytes() argument77 return PAGE_END(capacity * sizeof(AtexitEntry)); in round_up_to_page_bytes()80 static size_t next_capacity(size_t capacity) { in next_capacity() argument82 size_t result = round_up_to_page_bytes(MAX(1, capacity * 2)) / sizeof(AtexitEntry); in next_capacity()83 CHECK(result > capacity); in next_capacity()
43 __u64 capacity; member