Download include/node/cppgc/internal/api-constants.h from Ouzhang/node-v20-11-0-linux-x64: direct link, hf CLI and curl.
- Browser
- Download file 2.16 kB
-
https://huggingface.co/datasets/Ouzhang/node-v20-11-0-linux-x64/resolve/main/include/node/cppgc/internal/api-constants.h
- Command line
-
hf download hf://datasets/Ouzhang/node-v20-11-0-linux-x64/include/node/cppgc/internal/api-constants.h
-
curl -L -o api-constants.h https://huggingface.co/datasets/Ouzhang/node-v20-11-0-linux-x64/resolve/main/include/node/cppgc/internal/api-constants.h
2.16 kB
| // Copyright 2020 the V8 project authors. All rights reserved. | |
| // Use of this source code is governed by a BSD-style license that can be | |
| // found in the LICENSE file. | |
| namespace cppgc { | |
| namespace internal { | |
| // Embedders should not rely on this code! | |
| // Internal constants to avoid exposing internal types on the API surface. | |
| namespace api_constants { | |
| constexpr size_t kKB = 1024; | |
| constexpr size_t kMB = kKB * 1024; | |
| constexpr size_t kGB = kMB * 1024; | |
| // Offset of the uint16_t bitfield from the payload contaning the | |
| // in-construction bit. This is subtracted from the payload pointer to get | |
| // to the right bitfield. | |
| static constexpr size_t kFullyConstructedBitFieldOffsetFromPayload = | |
| 2 * sizeof(uint16_t); | |
| // Mask for in-construction bit. | |
| static constexpr uint16_t kFullyConstructedBitMask = uint16_t{1}; | |
| static constexpr size_t kPageSize = size_t{1} << 17; | |
| constexpr size_t kGuardPageSize = 0; | |
| constexpr size_t kGuardPageSize = 4096; | |
| static constexpr size_t kLargeObjectSizeThreshold = kPageSize / 2; | |
| constexpr size_t kCagedHeapReservationSize = static_cast<size_t>(2) * kGB; | |
| constexpr size_t kCagedHeapReservationSize = static_cast<size_t>(4) * kGB; | |
| constexpr size_t kCagedHeapReservationAlignment = kCagedHeapReservationSize; | |
| static constexpr size_t kDefaultAlignment = sizeof(void*); | |
| // Maximum support alignment for a type as in `alignof(T)`. | |
| static constexpr size_t kMaxSupportedAlignment = 2 * kDefaultAlignment; | |
| // Granularity of heap allocations. | |
| constexpr size_t kAllocationGranularity = sizeof(void*); | |
| // Default cacheline size. | |
| constexpr size_t kCachelineSize = 64; | |
| } // namespace api_constants | |
| } // namespace internal | |
| } // namespace cppgc | |