| /third_party/python/Lib/ |
| D | linecache.py | 1 """Cache lines from Python source files. 3 This is intended to read lines from modules imported -- hence if a filename 4 is not found, it will look down the module search path for a file by 16 # The cache. Maps filenames to either a thunk which will provide source code, 18 cache = {} variable 22 """Clear the cache entirely.""" 23 cache.clear() 27 """Get a line for a Python source file from the cache. 28 Update the cache if it doesn't contain an entry for this file already.""" 32 return lines[lineno - 1] [all …]
|
| /third_party/libcoap/include/coap3/ |
| D | coap_cache.h | 1 /* coap_cache.h -- Caching of CoAP requests 3 * Copyright (C) 2020-2023 Olaf Bergmann <bergmann@tzi.org> 5 * SPDX-License-Identifier: BSD-2-Clause 7 * This file is part of the CoAP library libcoap. Please see 12 * @file coap_cache.h 13 * @brief Provides a simple cache request storage for CoAP requests 23 * @defgroup cache Cache Support 24 * API for Cache-Key and Cache-Entry. 25 * See https://rfc-editor.org/rfc/rfc7252#section-5.4.2 30 * Callback to free off the app data when the cache-entry is [all …]
|
| /third_party/ntfs-3g/libntfs-3g/ |
| D | cache.c | 2 * cache.c : deal with LRU caches 4 * Copyright (c) 2008-2010 Jean-Pierre Andre 6 * This program/include file is free software; you can redistribute it and/or 11 * This program/include file is distributed in the hope that it will be 17 * along with this program (in the main directory of the NTFS-3G 18 * distribution in the file COPYING); if not, write to the Free Software 19 * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 35 #include "cache.h" 47 * A compare function must be provided for finding a wanted entry 48 * in the cache. Another function may be provided for invalidating [all …]
|
| /third_party/elfutils/libdw/ |
| D | fde.c | 2 Copyright (C) 2009-2010, 2014, 2015 Red Hat, Inc. 3 This file is part of elfutils. 5 This file is free software; you can redistribute it and/or modify 37 #include "encoded-value.h" 47 if (fde1->end == 0) in compare_fde() 49 if (fde1->start < fde2->start) in compare_fde() 50 return -1; in compare_fde() 51 if (fde1->start >= fde2->end) in compare_fde() 56 if (fde2->start < fde1->start) in compare_fde() 58 if (fde2->start >= fde1->end) in compare_fde() [all …]
|
| D | cie.c | 2 Copyright (C) 2009-2010 Red Hat, Inc. 3 This file is part of elfutils. 5 This file is free software; you can redistribute it and/or modify 34 #include "encoded-value.h" 45 if (cie1->offset < cie2->offset) in compare_cie() 46 return -1; in compare_cie() 47 if (cie1->offset > cie2->offset) in compare_cie() 54 intern_new_cie (Dwarf_CFI *cache, Dwarf_Off offset, const Dwarf_CIE *info) in intern_new_cie() argument 63 cie->offset = offset; in intern_new_cie() 64 cie->code_alignment_factor = info->code_alignment_factor; in intern_new_cie() [all …]
|
| /third_party/mesa3d/src/util/ |
| D | fossilize_db.c | 25 * use with the Mesa shader cache. 39 #include <sys/file.h> 52 #include "mesa-sha1.h" 64 /* Mesa uses 160bit hashes to identify cache entries, a hash of this size 66 * format uses a 64bit hash table to lookup file offsets for reading cache 76 shift--; in truncate_hash_to_64bits() 82 check_files_opened_successfully(FILE *file, FILE *db_idx) in check_files_opened_successfully() argument 84 if (!file) { in check_files_opened_successfully() 91 if (file) in check_files_opened_successfully() 92 fclose(file); in check_files_opened_successfully() [all …]
|
| D | mesa_cache_db.c | 7 * SPDX-License-Identifier: MIT 18 #include <sys/file.h> 24 #include "mesa-sha1.h" 61 static inline bool mesa_db_seek_end(FILE *file) in mesa_db_seek_end() argument 63 return !fseek(file, 0, SEEK_END); in mesa_db_seek_end() 66 static inline bool mesa_db_seek(FILE *file, long pos) in mesa_db_seek() argument 68 return !fseek(file, pos, SEEK_SET); in mesa_db_seek() 71 static inline bool mesa_db_seek_cur(FILE *file, long pos) in mesa_db_seek_cur() argument 73 return !fseek(file, pos, SEEK_CUR); in mesa_db_seek_cur() 76 static inline bool mesa_db_read_data(FILE *file, void *data, size_t size) in mesa_db_read_data() argument [all …]
|
| D | disk_cache_os.c | 85 /* TODO: implement disk cache support on windows */ 94 #include <sys/file.h> 111 * -1 in all other cases. 125 fprintf(stderr, "Cannot use %s for shader cache (not a directory)" in mkdir_if_needed() 126 "---disabling.\n", path); in mkdir_if_needed() 127 return -1; in mkdir_if_needed() 132 if (ret == 0 || (ret == -1 && errno == EEXIST)) in mkdir_if_needed() 135 fprintf(stderr, "Failed to create %s for shader cache (%s)---disabling.\n", in mkdir_if_needed() 138 return -1; in mkdir_if_needed() 145 * -1 in all other cases. [all …]
|
| D | disk_cache.c | 31 #include <sys/file.h> 45 #include "util/mesa-sha1.h" 53 /* The cache version should be bumped whenever a change is made to the 54 * structure of cache entries or the index. This will give any 3rd party 55 * applications reading the cache entries a chance to adjust to the changes. 57 * - The cache version is checked internally when reading a cache entry. If we 58 * ever have a mismatch we are in big trouble as this means we had a cache 62 * - There is no strict requirement that cache versions be backwards 74 disk_cache_init_queue(struct disk_cache *cache) in disk_cache_init_queue() argument 76 if (util_queue_is_initialized(&cache->cache_queue)) in disk_cache_init_queue() [all …]
|
| /third_party/mesa3d/src/util/tests/ |
| D | cache_test.cpp | 24 /* A collection of unit tests for cache.c */ 42 #include "util/mesa-sha1.h" 71 * This is equivalent to "rm -rf <dir>" with one bit of protection 75 * Returns 0 on success, -1 on any error. 81 return -1; in rmrf_local() 95 if (stat(full_path, &sb) != -1 && S_ISDIR(sb.st_mode)) in check_directories_created() 103 does_cache_contain(struct disk_cache *cache, const cache_key key) in does_cache_contain() argument 107 result = disk_cache_get(cache, key, NULL); in does_cache_contain() 118 cache_exists(struct disk_cache *cache) in cache_exists() argument 123 if (!cache) in cache_exists() [all …]
|
| /third_party/mesa3d/src/gallium/auxiliary/util/ |
| D | u_cache.c | 20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 29 * @file 30 * Improved cache implementation. 74 /** Max entries in the cache */ 80 /** Number of entries in the cache */ 83 /** Head of list, sorted from Least-recently used to Most-recently used */ 89 ensure_sanity(const struct util_cache *cache); 94 * Create a new cache with 'size' entries. Also provide functions for 103 struct util_cache *cache; in util_cache_create() local 105 cache = CALLOC_STRUCT(util_cache); in util_cache_create() [all …]
|
| /third_party/curl/docs/libcurl/opts/ |
| D | CURLOPT_HSTS.md | 1 --- 3 SPDX-License-Identifier: curl 8 - HTTP 9 See-also: 10 - CURLOPT_ALTSVC (3) 11 - CURLOPT_HSTS_CTRL (3) 12 - CURLOPT_RESOLVE (3) 13 --- 17 CURLOPT_HSTS - HSTS cache filename 29 Make the *filename* point to a filename to load an existing HSTS cache [all …]
|
| D | CURLOPT_ALTSVC.md | 1 --- 3 SPDX-License-Identifier: curl 7 See-also: 8 - CURLOPT_ALTSVC_CTRL (3) 9 - CURLOPT_CONNECT_TO (3) 10 - CURLOPT_COOKIEFILE (3) 11 - CURLOPT_RESOLVE (3) 13 - HTTP 14 --- 15 <!-- markdown-link-check-disable --> [all …]
|
| /third_party/ffmpeg/libavformat/ |
| D | cache.c | 2 * Input cache protocol. 5 * This file is part of FFmpeg. 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 * Based on file.c by Fabrice Bellard 71 return FFDIFFSIGN(*(const int64_t *)key, ((const CacheEntry *) node)->logical_pos); in cmp() 78 Context *c= h->priv_data; in cache_open() 80 av_strstart(arg, "cache:", &arg); in cache_open() 82 c->fd = avpriv_tempfile("ffcache", &buffername, 0, h); in cache_open() 83 if (c->fd < 0){ in cache_open() 85 return c->fd; in cache_open() [all …]
|
| /third_party/rust/rust/compiler/rustc_span/src/ |
| D | caching_source_map_view.rs | 12 // something is the last character of a file (this can happen when a file doesn't end in a 18 // Since the containment aspect of this range is only used to see whether or not the cache 19 // entry contains a position, the only ramification of the above is that we will get cache 21 // after a cache miss will produce the last line number, as desired. 23 file: Lrc<SourceFile>, field 35 if let Some((file, file_idx)) = new_file_and_idx { in update() 36 self.file = file; in update() 40 let line_index = self.file.lookup_line(pos).unwrap(); in update() 41 let line_bounds = self.file.line_bounds(line_index); in update() 61 pub fn new(source_map: &'sm SourceMap) -> CachingSourceMapView<'sm> { in new() [all …]
|
| /third_party/mbedtls/include/mbedtls/ |
| D | ssl_cache.h | 2 * \file ssl_cache.h 4 * \brief SSL session cache implementation 8 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 35 #define MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /*!< Maximum entries in cache */ 48 * \brief This structure is used for storing cache entries 52 mbedtls_time_t MBEDTLS_PRIVATE(timestamp); /*!< entry timestamp */ 65 * \brief Cache context 69 int MBEDTLS_PRIVATE(timeout); /*!< cache entry timeout */ 77 * \brief Initialize an SSL cache context 79 * \param cache SSL cache context [all …]
|
| /third_party/libcoap/src/ |
| D | coap_cache.c | 1 /* coap_cache.c -- Caching of CoAP requests 3 * Copyright (C) 2020-2023 Olaf Bergmann <bergmann@tzi.org> 5 * SPDX-License-Identifier: BSD-2-Clause 7 * This file is part of the CoAP library libcoap. Please see 12 * @file coap_cache.c 13 * @brief CoAP Cache handling 20 * be used as CacheKey. Options that can be cache keys are not Unsafe 27 /* https://rfc-editor.org/rfc/rfc7252#section-5.4.6 Nocachekey definition */ in is_cache_key() 31 * https://rfc-editor.org/rfc/rfc7641#section-2 Observe is not a in is_cache_key() 32 * part of the cache-key. in is_cache_key() [all …]
|
| /third_party/skia/src/gpu/ |
| D | GrThreadSafeCache.h | 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 19 // Ganesh creates a lot of utility textures (e.g., blurred-rrect masks) that need to be shared 20 // between the direct context and all the DDL recording contexts. This thread-safe cache 23 // In operation, each thread will first check if the threaded cache possesses the required texture. 26 // attempt to add it to the cache. If another thread had added it in the interim, the losing thread 31 // gpu-thread has precedence over the recording threads. 33 // The invariants for this cache differ a bit from those of the proxy and resource caches. 34 // For this cache: 36 // only this cache knows the unique key - neither the proxy nor backing resource should [all …]
|
| /third_party/python/Doc/reference/ |
| D | import.rst | 13 way. Functions such as :func:`importlib.import_module` and built-in 26 found, the module creation operation. While certain side-effects may occur, 45 of :pep:`302`. There is no longer any implicit import machinery - the full 55 recommended, simpler API than built-in :func:`__import__` for invoking the 72 You can think of packages as the directories on a file system and modules as 74 packages and modules need not originate from the file system. For the 76 directories and files. Like file system directories, packages are organized 93 ---------------- 102 ``__init__.py`` file. When a regular package is imported, this 103 ``__init__.py`` file is implicitly executed, and the objects it defines are [all …]
|
| /third_party/skia/m133/src/gpu/ganesh/ |
| D | GrThreadSafeCache.h | 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 41 // Ganesh creates a lot of utility textures (e.g., blurred-rrect masks) that need to be shared 42 // between the direct context and all the DDL recording contexts. This thread-safe cache 45 // In operation, each thread will first check if the threaded cache possesses the required texture. 48 // attempt to add it to the cache. If another thread had added it in the interim, the losing thread 53 // gpu-thread has precedence over the recording threads. 55 // The invariants for this cache differ a bit from those of the proxy and resource caches. 56 // For this cache: 58 // only this cache knows the unique key - neither the proxy nor backing resource should [all …]
|
| /third_party/curl/docs/ |
| D | HSTS.md | 1 <!-- 4 SPDX-License-Identifier: curl 5 --> 9 HTTP Strict-Transport-Security. Added as experimental in curl 18 libcurl features an in-memory cache for HSTS hosts, so that subsequent 19 HTTP-only requests to a hostname present in the cache gets internally 24 - `CURLOPT_HSTS_CTRL` - enable HSTS for this easy handle 25 - `CURLOPT_HSTS` - specify filename where to store the HSTS cache on close 30 - `--hsts [filename]` - enable HSTS, use the file as HSTS cache. If filename 31 is `""` (no length) then no file is used, only in-memory cache. [all …]
|
| /third_party/vk-gl-cts/external/vulkancts/vkscserver/ |
| D | pcreader.hpp | 7 * you may not use this file except in compliance with the License. 10 * http://www.apache.org/licenses/LICENSE-2.0 47 // Utility class to handle extracting information about pipelines from a pipeline cache blob. 49 // Instantiate the class with a pointer to the pipeline cache blob and the size. 50 // The pipeline cache blob is NOT copied and the application must maintain the lifetime 52 // The cache blob will never be modified by this class. 54 // getSafetyCriticalOneHeader - return the safety critical header field 56 // getPipelineIndexEntry(index) - return the pipeline index entry for a specified index in the head… 58 // getPipelineIndexEntry(UUID) - return the pipeline index entry for a specified pipeline identifier 60 // getJson - get a pointer to the json for a specfied pipeline index entry [all …]
|
| /third_party/python/Lib/test/ |
| D | test_linecache.py | 55 self.file_byte_string = ''.join(self.file_list).encode('utf-8') 97 file_byte_string = b'# coding=utf-8\n\x80abc' 107 self.assertEqual(getline(FILENAME, -1), EMPTY) 117 for entry in MODULES: 118 filename = os.path.join(MODULE_PATH, entry) + '.py' 119 with open(filename, encoding='utf-8') as file: 120 for index, line in enumerate(file): 129 with open(os_helper.TESTFN, "w", encoding='utf-8') as fp: 136 for entry in MODULES: 137 filename = os.path.join(MODULE_PATH, entry) + '.py' [all …]
|
| /third_party/f2fs-tools/lib/ |
| D | libf2fs_io.c | 10 * : add quick-buffer for sload compression support 64 *offset -= in __get_device_fd() 69 return -1; in __get_device_fd() 81 /* ---------- dev_cache, Least Used First (LUF) policy ------------------- */ 88 static uint64_t *dcache_lastused; /* last used ticks for cache entries */ 113 20, -20, 40, -40, 80, -80, 160, -160, 114 320, -320, 640, -640, 1280, -1280, 2560, -2560, 123 /* Number of used cache entries */ in dcache_print_statistics() 130 * c: number of cache entries in dcache_print_statistics() 133 * CH: cache hit in dcache_print_statistics() [all …]
|
| /third_party/skia/third_party/externals/icu/source/common/ |
| D | unifiedcache.h | 9 * File UNIFIEDCACHE.H - The ICU Unified cache. 33 * A base class for all cache keys. 62 * Create a new object for this key. Called by cache on cache miss. 64 * that getting an object from the cache and returning it without calling 119 buffer[bufLen - 1] = 0; in writeDescription() 132 * Cache key based on locale. 159 return fLoc == fOther->fLoc; 172 buffer[bufLen - 1] = 0; in writeDescription() 179 * The unified cache. A singleton type. 193 * Return a pointer to the global cache instance. [all …]
|