repo
stringlengths
1
152
file
stringlengths
14
221
code
stringlengths
501
25k
file_length
int64
501
25k
avg_line_length
float64
20
99.5
max_line_length
int64
21
134
extension_type
stringclasses
2 values
null
NearPMSW-main/nearpm/shadow/redis-NDP-sd/deps/geohash-int/geohash.h
/* * Copyright (c) 2013-2014, yinqiwen <yinqiwen@gmail.com> * Copyright (c) 2014, Matt Stancliff <matt@genges.com>. * Copyright (c) 2015, Salvatore Sanfilippo <antirez@gmail.com>. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided ...
4,124
33.663866
80
h
null
NearPMSW-main/nearpm/shadow/redis-NDP-sd/deps/geohash-int/geohash.c
/* * Copyright (c) 2013-2014, yinqiwen <yinqiwen@gmail.com> * Copyright (c) 2014, Matt Stancliff <matt@genges.com>. * Copyright (c) 2015-2016, Salvatore Sanfilippo <antirez@gmail.com>. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted prov...
10,005
32.804054
91
c
null
NearPMSW-main/nearpm/shadow/redis-NDP-sd/deps/geohash-int/geohash_helper.h
/* * Copyright (c) 2013-2014, yinqiwen <yinqiwen@gmail.com> * Copyright (c) 2014, Matt Stancliff <matt@genges.com>. * Copyright (c) 2015, Salvatore Sanfilippo <antirez@gmail.com>. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided ...
3,368
45.791667
80
h
null
NearPMSW-main/nearpm/shadow/redis-NDP-sd/utils/corrupt_rdb.c
/* Trivia program to corrupt an RDB file in order to check the RDB check * program behavior and effectiveness. * * Copyright (C) 2016 Salvatore Sanfilippo. * This software is released in the 3-clause BSD license. */ #include <stdio.h> #include <fcntl.h> #include <sys/stat.h> #include <stdlib.h> #include <unistd.h>...
1,070
22.8
72
c
null
NearPMSW-main/nearpm/shadow/redis-NDP-sd/utils/hashtable/rehashing.c
#include "redis.h" #include "dict.h" void _redisAssert(char *x, char *y, int l) { printf("ASSERT: %s %s %d\n",x,y,l); exit(1); } unsigned int dictKeyHash(const void *keyp) { unsigned long key = (unsigned long)keyp; key = dictGenHashFunction(&key,sizeof(key)); key += ~(key << 15); key ^= (key ...
3,504
23.51049
75
c
null
NearPMSW-main/nearpm/shadow/pmemkv-bench-sd/bench/util/csv.h
// SPDX-License-Identifier: Apache-2.0 /* Copyright 2020-2021, Intel Corporation */ #pragma once #include <iostream> #include <map> #include <ostream> #include <set> #include <string> template <typename IdType> class CSV { private: /* Hold data in two-dimensional map of strings: data_matrix[row][column] */ std::...
1,381
21.290323
73
h
null
NearPMSW-main/nearpm/shadow/pmemkv-bench-sd/bench/util/logging.h
// Copyright (c) 2011 The LevelDB Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-BSD file. See the AUTHORS file for names of contributors. // SPDX-License-Identifier: Apache-2.0 // Copyright 2020, Intel Corporation // Must not be include...
1,519
30.666667
81
h
null
NearPMSW-main/nearpm/shadow/pmemkv-bench-sd/bench/util/testutil.h
// Copyright (c) 2011 The LevelDB Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-BSD file. See the AUTHORS file for names of contributors. // SPDX-License-Identifier: Apache-2.0 // Copyright 2020, Intel Corporation #ifndef STORAGE_LEVELD...
1,984
28.191176
99
h
null
NearPMSW-main/nearpm/shadow/pmemkv-bench-sd/bench/util/mutexlock.h
// Copyright (c) 2011 The LevelDB Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-BSD file. See the AUTHORS file for names of contributors. // SPDX-License-Identifier: Apache-2.0 // Copyright 2020, Intel Corporation #ifndef STORAGE_LEVELD...
1,202
24.0625
81
h
null
NearPMSW-main/nearpm/shadow/pmemkv-bench-sd/bench/util/random.h
// Copyright (c) 2011 The LevelDB Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-BSD file. See the AUTHORS file for names of contributors. // SPDX-License-Identifier: Apache-2.0 // Copyright 2020, Intel Corporation #ifndef STORAGE_LEVELD...
2,202
26.886076
81
h
null
NearPMSW-main/nearpm/shadow/pmemkv-bench-sd/bench/util/posix_logger.h
// Copyright (c) 2011 The LevelDB Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-BSD file. See the AUTHORS file for names of contributors. // SPDX-License-Identifier: Apache-2.0 // Copyright 2020, Intel Corporation // // Logger implement...
2,503
23.54902
81
h
null
NearPMSW-main/nearpm/shadow/pmemkv-bench-sd/bench/util/env_posix_test_helper.h
// Copyright 2017 The LevelDB Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-BSD file. See the AUTHORS file for names of contributors. // SPDX-License-Identifier: Apache-2.0 // Copyright 2020, Intel Corporation #ifndef STORAGE_LEVELDB_UT...
967
28.333333
81
h
null
NearPMSW-main/nearpm/shadow/pmemkv-bench-sd/bench/port/port_posix.h
// Copyright (c) 2011 The LevelDB Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-BSD file. See the AUTHORS file for names of contributors. // SPDX-License-Identifier: Apache-2.0 // Copyright 2020, Intel Corporation // See port_example.h ...
4,061
23.768293
98
h
null
NearPMSW-main/nearpm/shadow/pmemkv-bench-sd/bench/port/thread_annotations.h
// Copyright (c) 2012 The LevelDB Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-BSD file. See the AUTHORS file for names of contributors. // SPDX-License-Identifier: Apache-2.0 // Copyright 2020, Intel Corporation #ifndef STORAGE_LEVELD...
1,429
21.34375
81
h
null
NearPMSW-main/nearpm/shadow/pmemkv-bench-sd/bench/port/atomic_pointer.h
// Copyright (c) 2011 The LevelDB Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-BSD file. See the AUTHORS file for names of contributors. // SPDX-License-Identifier: Apache-2.0 // Copyright 2020, Intel Corporation // AtomicPointer provi...
7,207
23.26936
84
h
null
NearPMSW-main/nearpm/shadow/pmemkv-bench-sd/bench/include/leveldb/status.h
// Copyright (c) 2011 The LevelDB Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-BSD file. See the AUTHORS file for names of contributors. // SPDX-License-Identifier: Apache-2.0 // Copyright 2020, Intel Corporation // A Status encapsulat...
3,658
23.231788
81
h
null
NearPMSW-main/nearpm/shadow/pmemkv-bench-sd/bench/include/leveldb/slice.h
// Copyright (c) 2011 The LevelDB Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-BSD file. See the AUTHORS file for names of contributors. // SPDX-License-Identifier: Apache-2.0 // Copyright 2020, Intel Corporation // Slice is a simple s...
3,163
21.125874
81
h
null
NearPMSW-main/nearpm/shadow/pmemkv-bench-sd/bench/include/leveldb/env.h
// Copyright (c) 2011 The LevelDB Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-BSD file. See the AUTHORS file for names of contributors. // SPDX-License-Identifier: Apache-2.0 // Copyright 2020, Intel Corporation // An Env is an interf...
12,539
30.827411
93
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/tools/rpmemd/rpmemd_config.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2018, Intel Corporation */ /* * rpmemd_config.h -- internal definitions for rpmemd config */ #include <stdint.h> #include <stdbool.h> #ifndef RPMEMD_DEFAULT_LOG_FILE #define RPMEMD_DEFAULT_LOG_FILE ("/var/log/" DAEMON_NAME ".log") #endif #ifndef RPMEMD_GL...
1,012
21.021739
77
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/tools/rpmemd/rpmemd.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2020, Intel Corporation */ /* * rpmemd.c -- rpmemd main source file */ #include <stdlib.h> #include <unistd.h> #include <errno.h> #include <string.h> #include <sys/socket.h> #include <netinet/in.h> #include "librpmem.h" #include "rpmemd.h" #include "rpmemd...
18,497
22.007463
79
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/tools/rpmemd/rpmemd_log.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2018, Intel Corporation */ /* * rpmemd_log.h -- rpmemd logging functions declarations */ #include <string.h> #include "util.h" #define FORMAT_PRINTF(a, b) __attribute__((__format__(__printf__, (a), (b)))) /* * The tab character is not allowed in rpmemd l...
1,991
25.210526
77
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/tools/rpmemd/rpmemd_util.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2017-2018, Intel Corporation */ /* * rpmemd_util.c -- rpmemd utility functions definitions */ #include <stdlib.h> #include <unistd.h> #include "libpmem.h" #include "rpmem_common.h" #include "rpmemd_log.h" #include "rpmemd_util.h" /* * rpmemd_pmem_persist -- p...
2,839
22.666667
79
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/tools/rpmemd/rpmemd_db.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2018, Intel Corporation */ /* * rpmemd_db.h -- internal definitions for rpmemd database of pool set files */ struct rpmemd_db; struct rpmem_pool_attr; /* * struct rpmemd_db_pool -- remote pool context */ struct rpmemd_db_pool { void *pool_addr; size_t ...
1,132
32.323529
76
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/tools/rpmemd/rpmemd_obc.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2019, Intel Corporation */ /* * rpmemd_obc.c -- rpmemd out-of-band connection definitions */ #include <stdlib.h> #include <errno.h> #include <stdint.h> #include <string.h> #include <netinet/in.h> #include <arpa/inet.h> #include <sys/socket.h> #include <unis...
12,309
21.422587
79
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/tools/rpmemd/rpmemd_config.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2020, Intel Corporation */ /* * rpmemd_config.c -- rpmemd config source file */ #include <pwd.h> #include <stdio.h> #include <stddef.h> #include <stdlib.h> #include <stdint.h> #include <string.h> #include <unistd.h> #include <ctype.h> #include <errno.h> #in...
15,007
22.413417
79
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/tools/rpmemd/rpmemd_db.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2020, Intel Corporation */ /* * rpmemd_db.c -- rpmemd database of pool set files */ #include <stdio.h> #include <stdint.h> #include <errno.h> #include <string.h> #include <unistd.h> #include <dirent.h> #include <sys/file.h> #include <sys/mman.h> #include "...
13,747
20.616352
80
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/tools/rpmemd/rpmemd_fip.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2018, Intel Corporation */ /* * rpmemd_fip.h -- rpmemd libfabric provider module header file */ #include <stddef.h> struct rpmemd_fip; struct rpmemd_fip_attr { void *addr; size_t size; unsigned nlanes; size_t nthreads; size_t buff_size; enum rpmem_p...
1,066
27.078947
70
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/tools/rpmemd/rpmemd_obc.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2018, Intel Corporation */ /* * rpmemd_obc.h -- rpmemd out-of-band connection declarations */ #include <stdint.h> #include <sys/types.h> #include <sys/socket.h> struct rpmemd_obc; struct rpmemd_obc_requests { int (*create)(struct rpmemd_obc *obc, void *ar...
1,296
31.425
65
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/tools/pmempool/create.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2014-2019, Intel Corporation */ /* * create.c -- pmempool create command source file */ #include <stdio.h> #include <getopt.h> #include <stdlib.h> #include <fcntl.h> #include <unistd.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h> #include <sy...
14,987
21.403587
109
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/tools/pmempool/transform.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2018, Intel Corporation */ /* * transform.c -- pmempool transform command source file */ #include <stdio.h> #include <libgen.h> #include <string.h> #include <unistd.h> #include <stdlib.h> #include <getopt.h> #include <stdbool.h> #include <sys/mman.h> #inclu...
3,689
21.919255
77
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/tools/pmempool/info_blk.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2014-2018, Intel Corporation */ /* * Copyright (c) 2016, Microsoft Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * ...
14,565
24.644366
74
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/tools/pmempool/info_obj.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2014-2019, Intel Corporation */ /* * info_obj.c -- pmempool info command source file for obj pool */ #include <stdlib.h> #include <stdbool.h> #include <err.h> #include <signal.h> #include <sys/stat.h> #include <sys/mman.h> #include <assert.h> #include <inttypes.h...
24,182
24.11215
80
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/tools/pmempool/check.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2014-2019, Intel Corporation */ /* * check.c -- pmempool check command source file */ #include <getopt.h> #include <stdlib.h> #include "common.h" #include "check.h" #include "output.h" #include "set.h" #include "file.h" #include "libpmempool.h" typedef enum { ...
7,163
21.670886
72
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/tools/pmempool/common.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2014-2020, Intel Corporation */ /* * common.h -- declarations of common functions */ #include <stdint.h> #include <stddef.h> #include <stdarg.h> #include <stdbool.h> #include "queue.h" #include "log.h" #include "blk.h" #include "libpmemobj.h" #include "lane.h" ...
5,957
28.205882
79
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/tools/pmempool/info_log.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2014-2019, Intel Corporation */ /* * info_log.c -- pmempool info command source file for log pool */ #include <stdbool.h> #include <stdlib.h> #include <err.h> #include <sys/mman.h> #include "common.h" #include "output.h" #include "info.h" /* * info_log_data --...
3,972
23.677019
70
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/tools/pmempool/info.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2014-2019, Intel Corporation */ /* * info.h -- pmempool info command header file */ #include "vec.h" /* * Verbose levels used in application: * * VERBOSE_DEFAULT: * Default value for application's verbosity level. * This is also set for data structures whi...
4,492
25.904192
73
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/tools/pmempool/output.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2014-2018, Intel Corporation */ /* * output.h -- declarations of output printing related functions */ #include <time.h> #include <stdint.h> #include <stdio.h> void out_set_vlevel(int vlevel); void out_set_stream(FILE *stream); void out_set_prefix(const char *pr...
2,070
41.265306
74
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/tools/pmempool/synchronize.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2018, Intel Corporation */ /* * synchronize.c -- pmempool sync command source file */ #include "synchronize.h" #include <stdio.h> #include <libgen.h> #include <string.h> #include <unistd.h> #include <stdlib.h> #include <getopt.h> #include <stdbool.h> #incl...
3,499
21.151899
98
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/tools/daxio/daxio.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2018-2020, Intel Corporation */ /* * daxio.c -- simple app for reading and writing data from/to * Device DAX device using mmap instead of file I/O API */ #include <assert.h> #include <stdio.h> #include <unistd.h> #include <getopt.h> #include <stdlib....
14,160
22.291118
79
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmemlog/log.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2014-2020, Intel Corporation */ /* * log.h -- internal definitions for libpmem log module */ #ifndef LOG_H #define LOG_H 1 #include <stdint.h> #include <stddef.h> #include <endian.h> #include "ctl.h" #include "util.h" #include "os_thread.h" #include "pool_hdr....
2,832
23.422414
74
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmemlog/log.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2014-2020, Intel Corporation */ /* * log.c -- log memory pool entry points for libpmem */ #include <inttypes.h> #include <stdio.h> #include <string.h> #include <sys/types.h> #include <sys/param.h> #include <unistd.h> #include <errno.h> #include <time.h> #include...
19,695
20.982143
75
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmemlog/libpmemlog.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2014-2018, Intel Corporation */ /* * libpmemlog.c -- pmem entry points for libpmemlog */ #include <stdio.h> #include <stdint.h> #include "libpmemlog.h" #include "ctl_global.h" #include "pmemcommon.h" #include "log.h" /* * The variable from which the config i...
4,301
20.29703
78
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/core/os_windows.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2017-2020, Intel Corporation */ /* * Copyright (c) 2016, Microsoft Corporation. All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * ...
16,299
20.967655
79
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/core/os_thread_posix.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2017-2020, Intel Corporation */ /* * os_thread_posix.c -- Posix thread abstraction layer */ #define _GNU_SOURCE #include <pthread.h> #ifdef __FreeBSD__ #include <pthread_np.h> #endif #include <semaphore.h> #include "os_thread.h" #include "util.h" typedef struc...
9,190
20.032037
72
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/core/util.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2014-2020, Intel Corporation */ /* * util.c -- very basic utilities */ #include <stdlib.h> #include <stdio.h> #include <string.h> #include <unistd.h> #include <endian.h> #include <errno.h> #include <time.h> #include <stdarg.h> #include "util.h" #include "os.h" ...
10,620
20.456566
79
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/core/os_thread_windows.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2020, Intel Corporation */ /* * Copyright (c) 2016, Microsoft Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * ...
15,425
22.443769
78
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/core/out.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2014-2020, Intel Corporation */ /* * out.c -- support for logging, tracing, and assertion output * * Macros like LOG(), OUT, ASSERT(), etc. end up here. */ #include <stdio.h> #include <stdarg.h> #include <stdlib.h> #include <unistd.h> #include <limits.h> #incl...
12,602
20.252951
80
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/core/util.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2014-2020, Intel Corporation */ /* * Copyright (c) 2016-2020, Microsoft Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * ...
17,058
30.47417
79
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/core/valgrind_internal.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2020, Intel Corporation */ /* * valgrind_internal.h -- internal definitions for valgrind macros */ #ifndef PMDK_VALGRIND_INTERNAL_H #define PMDK_VALGRIND_INTERNAL_H 1 #if !defined(_WIN32) && !defined(__FreeBSD__) #ifndef VALGRIND_ENABLED #define VALGRIND_E...
11,169
22.319415
75
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/core/alloc.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2019-2020, Intel Corporation */ #ifndef COMMON_ALLOC_H #define COMMON_ALLOC_H #include <stdlib.h> #ifdef __cplusplus extern "C" { #endif typedef void *(*Malloc_func)(size_t size); typedef void *(*Realloc_func)(void *ptr, size_t size); extern Malloc_func fn_mall...
1,131
21.64
69
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/core/os_thread.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2020, Intel Corporation */ /* * Copyright (c) 2016, Microsoft Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * ...
5,876
31.291209
75
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/core/out.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2014-2020, Intel Corporation */ /* * out.h -- definitions for "out" module */ #ifndef PMDK_OUT_H #define PMDK_OUT_H 1 #include <stdarg.h> #include <stddef.h> #include <stdlib.h> #include "util.h" #ifdef __cplusplus extern "C" { #endif /* * Suppress errors w...
6,066
25.150862
80
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/core/valgrind/memcheck.h
/* ---------------------------------------------------------------- Notice that the following BSD-style license applies to this one file (memcheck.h) only. The rest of Valgrind is licensed under the terms of the GNU General Public License, version 2, unless otherwise indicated. See the COPYING file i...
15,621
47.666667
79
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/core/valgrind/pmemcheck.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2014-2015, Intel Corporation */ #ifndef __PMEMCHECK_H #define __PMEMCHECK_H /* This file is for inclusion into client (your!) code. You can use these macros to manipulate and query memory permissions inside your own programs. See comment near the top o...
9,085
47.588235
77
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/common/ctl.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2019, Intel Corporation */ /* * ctl.h -- internal declaration of statistics and control related structures */ #ifndef PMDK_CTL_H #define PMDK_CTL_H 1 #include "queue.h" #include "errno.h" #include "out.h" #ifdef __cplusplus extern "C" { #endif struct ctl...
5,127
24.261084
80
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/common/file.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2014-2020, Intel Corporation */ /* * file.h -- internal definitions for file module */ #ifndef PMDK_FILE_H #define PMDK_FILE_H 1 #include <stddef.h> #include <sys/stat.h> #include <sys/types.h> #include <dirent.h> #include <limits.h> #include "os.h" #ifdef __c...
3,013
24.982759
78
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/common/badblocks.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2017-2020, Intel Corporation */ /* * badblocks.h -- bad blocks API based on the libpmem2 library */ #ifndef PMDK_BADBLOCKS_H #define PMDK_BADBLOCKS_H 1 #include <string.h> #include <stdint.h> #include <sys/types.h> #ifdef __cplusplus extern "C" { #endif #defi...
1,878
23.089744
130
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/common/ctl.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2020, Intel Corporation */ /* * ctl.c -- implementation of the interface for examination and modification of * the library's internal state */ #include "ctl.h" #include "os.h" #include "alloc.h" #define CTL_MAX_ENTRIES 100 #define MAX_CONFIG_FILE_LEN (1 <...
12,706
20.946459
80
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/common/pool_hdr.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2014-2019, Intel Corporation */ /* * pool_hdr.c -- pool header utilities */ #include <errno.h> #include <stdio.h> #include <string.h> #include <endian.h> #include "out.h" #include "pool_hdr.h" /* Determine ISA for which PMDK is currently compiled */ #if define...
8,733
24.242775
80
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/common/shutdown_state.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2017-2020, Intel Corporation */ /* * shutdown_state.h -- unsafe shudown detection */ #ifndef PMDK_SHUTDOWN_STATE_H #define PMDK_SHUTDOWN_STATE_H 1 #include <stdint.h> #ifdef __cplusplus extern "C" { #endif struct pool_replica; struct shutdown_state { uint64_...
950
21.642857
78
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/common/uuid.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2014-2018, Intel Corporation */ /* * uuid.c -- uuid utilities */ #include <stdlib.h> #include <stdio.h> #include <string.h> #include "uuid.h" #include "out.h" /* * util_uuid_to_string -- generate a string form of the uuid */ int util_uuid_to_string(const uuid...
1,818
20.654762
66
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/common/queue.h
/* * Source: glibc 2.24 (git://sourceware.org/glibc.git /misc/sys/queue.h) * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * Copyright (c) 2016, Microsoft Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * ...
22,165
33.907087
85
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/common/set.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2014-2019, Intel Corporation */ /* * Copyright (c) 2016, Microsoft Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * ...
14,145
31.077098
80
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/common/shutdown_state.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2017-2020, Intel Corporation */ /* * shutdown_state.c -- unsafe shudown detection */ #include <string.h> #include <stdbool.h> #include <endian.h> #include "shutdown_state.h" #include "out.h" #include "util.h" #include "os_deep.h" #include "set.h" #include "libpm...
5,491
22.370213
117
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/common/mmap.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2014-2020, Intel Corporation */ /* * mmap.h -- internal definitions for mmap module */ #ifndef PMDK_MMAP_H #define PMDK_MMAP_H 1 #include <stddef.h> #include <stdint.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include <errno.h> #includ...
3,328
22.27972
76
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/common/ravl.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2018-2020, Intel Corporation */ /* * ravl.c -- implementation of a RAVL tree * https://sidsen.azurewebsites.net//papers/ravl-trees-journal.pdf */ #include <stdlib.h> #include <string.h> #include <errno.h> #include "out.h" #include "ravl.h" #include "alloc.h" #...
12,600
20.801038
79
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/common/vecq.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2018-2019, Intel Corporation */ /* * vecq.h -- vector queue (FIFO) interface */ #ifndef PMDK_VECQ_H #define PMDK_VECQ_H 1 #include <stddef.h> #include "util.h" #include "out.h" #include "alloc.h" #ifdef __cplusplus extern "C" { #endif #define VECQ_INIT_SIZE (...
2,731
20.178295
68
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/common/os_deep_linux.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2017-2020, Intel Corporation */ /* * os_deep_linux.c -- Linux abstraction layer */ #define _GNU_SOURCE #include <inttypes.h> #include <fcntl.h> #include <sys/stat.h> #include "out.h" #include "os.h" #include "mmap.h" #include "file.h" #include "libpmem.h" #incl...
3,932
21.095506
75
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/common/file_windows.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2020, Intel Corporation */ /* * file_windows.c -- Windows emulation of Linux-specific system calls */ /* * XXX - The initial approach to PMDK for Windows port was to minimize the * amount of changes required in the core part of the library, and to avoid ...
4,186
20.253807
76
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/common/mmap.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2014-2020, Intel Corporation */ /* * mmap.c -- mmap utilities */ #include <errno.h> #include <inttypes.h> #include <fcntl.h> #include <stdlib.h> #include <string.h> #include <sys/mman.h> #include <unistd.h> #include "file.h" #include "queue.h" #include "mmap.h"...
11,141
21.063366
115
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/common/mmap_posix.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2014-2018, Intel Corporation */ /* * mmap_posix.c -- memory-mapped files for Posix */ #include <stdio.h> #include <sys/mman.h> #include <sys/param.h> #include "mmap.h" #include "out.h" #include "os.h" #define PROCMAXLEN 2048 /* maximum expected line length in /...
5,438
27.036082
79
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/common/ravl.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2018-2019, Intel Corporation */ /* * ravl.h -- internal definitions for ravl tree */ #ifndef LIBPMEMOBJ_RAVL_H #define LIBPMEMOBJ_RAVL_H 1 #include <stddef.h> #ifdef __cplusplus extern "C" { #endif struct ravl; struct ravl_node; enum ravl_predicate { RAVL_P...
1,556
27.309091
73
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/common/pool_hdr.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2014-2019, Intel Corporation */ /* * pool_hdr.h -- internal definitions for pool header module */ #ifndef PMDK_POOL_HDR_H #define PMDK_POOL_HDR_H 1 #include <stddef.h> #include <stdint.h> #include <unistd.h> #include "uuid.h" #include "shutdown_state.h" #includ...
7,980
29.696154
77
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/common/os_deep_windows.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2017-2018, Intel Corporation */ /* * os_deep_windows.c -- Windows abstraction layer for deep_* functions */ #include <windows.h> #include "out.h" #include "os.h" #include "set.h" #include "libpmem.h" /* * os_range_deep_common -- call msnyc for non DEV dax */ ...
1,598
20.039474
75
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/common/mmap_windows.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2018, Intel Corporation */ /* * Copyright (c) 2015-2017, Microsoft Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * ...
4,965
31.887417
76
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/examples/libpmemlog/logfile/addlog.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2014-2019, Intel Corporation */ /* * addlog -- given a log file, append a log entry * * Usage: * fallocate -l 1G /path/to/pm-aware/file * addlog /path/to/pm-aware/file "first line of entry" "second line" */ #include <ex_common.h> #include <sys/stat.h> #inclu...
2,511
21.230088
73
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/examples/libpmemblk/assetdb/asset_checkout.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2014-2019, Intel Corporation */ /* * asset_checkout -- mark an asset as checked out to someone * * Usage: * asset_checkin /path/to/pm-aware/file asset-ID name */ #include <ex_common.h> #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <string...
1,634
20.233766
66
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/examples/libpmemobj/buffons_needle_problem.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2019, Intel Corporation */ /* * buffons_needle_problem.c <path> [<n>] -- example illustrating * usage of libpmemobj * * Calculates pi number by solving Buffon's needle problem. * Takes one/two arguments -- path of the file and integer amount of trials * or o...
3,119
20.22449
75
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/examples/libpmemobj/pi.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2019, Intel Corporation */ /* * pi.c -- example usage of user lists * * Calculates pi number with multiple threads using Leibniz formula. */ #include <ex_common.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #include <ass...
5,620
20.786822
68
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/examples/libpmemobj/setjmp.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2019, Intel Corporation */ /* * setjmp.c -- example illustrating an issue with indeterminate value * of non-volatile automatic variables after transaction abort. * See libpmemobj(7) for details. * * NOTE: To observe the problem (likely segfault on a secon...
1,723
23.985507
77
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/examples/libpmemobj/pmemblk/obj_pmemblk.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2019, Intel Corporation */ /* * obj_pmemblk.c -- alternate pmemblk implementation based on pmemobj * * usage: obj_pmemblk [co] file blk_size [cmd[:blk_num[:data]]...] * * c - create file * o - open file * * The "cmd" arguments match the pmemblk fun...
9,447
22.62
76
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/examples/libpmemobj/slab_allocator/main.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2017, Intel Corporation */ /* * main.c -- example usage of a slab-like mechanism implemented in libpmemobj * * This application does nothing besides demonstrating the example slab * allocator mechanism. * * By using the CTL alloc class API we can instrument l...
2,066
21.225806
77
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/examples/libpmemobj/slab_allocator/slab_allocator.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2017, Intel Corporation */ /* * slab_allocator.h -- slab-like mechanism for libpmemobj */ #ifndef SLAB_ALLOCATOR_H #define SLAB_ALLOCATOR_H #include <libpmemobj.h> struct slab_allocator; struct slab_allocator *slab_new(PMEMobjpool *pop, size_t size); void sla...
542
22.608696
63
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/examples/libpmemobj/array/array.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2019, Intel Corporation */ /* * array.c -- example of arrays usage */ #include <ex_common.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <assert.h> #include <sys/stat.h> #include <libpmemobj.h> #define TOID_ARRAY(x) TOID(x) #define CO...
11,844
22.595618
77
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/examples/libpmemobj/list_map/skiplist_map.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016, Intel Corporation */ /* * skiplist_map.c -- Skiplist implementation */ #include <assert.h> #include <errno.h> #include <stdlib.h> #include <stdio.h> #include "skiplist_map.h" #define SKIPLIST_LEVELS_NUM 4 #define NULL_NODE TOID_NULL(struct skiplist_map_no...
8,913
23.899441
83
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/examples/libpmemobj/list_map/skiplist_map.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016, Intel Corporation */ /* * skiplist_map.h -- sorted list collection implementation */ #ifndef SKIPLIST_MAP_H #define SKIPLIST_MAP_H #include <libpmemobj.h> #ifndef SKIPLIST_MAP_TYPE_OFFSET #define SKIPLIST_MAP_TYPE_OFFSET 2020 #endif struct skiplist_map_...
1,688
36.533333
80
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/examples/libpmemobj/hashmap/hashmap_tx.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2017, Intel Corporation */ #ifndef HASHMAP_TX_H #define HASHMAP_TX_H #include <stddef.h> #include <stdint.h> #include <hashmap.h> #include <libpmemobj.h> #ifndef HASHMAP_TX_TYPE_OFFSET #define HASHMAP_TX_TYPE_OFFSET 1004 #endif struct hashmap_tx; TOID_DECLAR...
1,270
34.305556
76
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/examples/libpmemobj/hashmap/hashmap_rp.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2018, Intel Corporation */ #ifndef HASHMAP_RP_H #define HASHMAP_RP_H #include <stddef.h> #include <stdint.h> #include <hashmap.h> #include <libpmemobj.h> #ifndef HASHMAP_RP_TYPE_OFFSET #define HASHMAP_RP_TYPE_OFFSET 1008 #endif /* Flags to indicate if insertion i...
1,780
36.104167
76
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/examples/libpmemobj/hashmap/hashmap_internal.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2017, Intel Corporation */ #ifndef HASHSET_INTERNAL_H #define HASHSET_INTERNAL_H /* large prime number used as a hashing function coefficient */ #define HASH_FUNC_COEFF_P 32212254719ULL /* initial number of buckets */ #define INIT_BUCKETS_NUM 10 /* number o...
521
25.1
72
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/examples/libpmemobj/hashmap/hashmap_tx.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2019, Intel Corporation */ /* integer hash set implementation which uses only transaction APIs */ #include <stdlib.h> #include <stdio.h> #include <errno.h> #include <inttypes.h> #include <libpmemobj.h> #include "hashmap_tx.h" #include "hashmap_internal.h" st...
11,602
22.825462
83
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/examples/libpmemobj/hashmap/hashmap_rp.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2018, Intel Corporation */ /* * Integer hash set implementation with open addressing Robin Hood collision * resolution which uses action.h reserve/publish API. */ #include <assert.h> #include <stdlib.h> #include <stdio.h> #include <errno.h> #include <inttypes.h...
16,890
23.338617
79
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/examples/libpmemobj/hashmap/hashmap_atomic.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2017, Intel Corporation */ #ifndef HASHMAP_ATOMIC_H #define HASHMAP_ATOMIC_H #include <stddef.h> #include <stdint.h> #include <hashmap.h> #include <libpmemobj.h> #ifndef HASHMAP_ATOMIC_TYPE_OFFSET #define HASHMAP_ATOMIC_TYPE_OFFSET 1000 #endif struct hashmap...
1,384
36.432432
79
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/examples/libpmemobj/hashmap/hashmap_atomic.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2018, Intel Corporation */ /* integer hash set implementation which uses only atomic APIs */ #include <stdlib.h> #include <stdio.h> #include <string.h> #include <errno.h> #include <inttypes.h> #include <libpmemobj.h> #include "hashmap_atomic.h" #include "has...
12,825
24.001949
80
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/examples/libpmemobj/pmemlog/obj_pmemlog_simple.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2017, Intel Corporation */ /* * obj_pmemlog_simple.c -- alternate pmemlog implementation based on pmemobj * * usage: obj_pmemlog_simple [co] file [cmd[:param]...] * * c - create file * o - open file * * The "cmd" arguments match the pmemlog functio...
9,720
21.043084
76
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/examples/libpmemobj/pmemlog/obj_pmemlog.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2019, Intel Corporation */ /* * obj_pmemlog.c -- alternate pmemlog implementation based on pmemobj * * usage: obj_pmemlog [co] file [cmd[:param]...] * * c - create file * o - open file * * The "cmd" arguments match the pmemlog functions: * a - a...
9,486
20.960648
80
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/examples/libpmemobj/pmemlog/obj_pmemlog_macros.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2019, Intel Corporation */ /* * obj_pmemlog_macros.c -- alternate pmemlog implementation based on pmemobj * * usage: obj_pmemlog_macros [co] file [cmd[:param]...] * * c - create file * o - open file * * The "cmd" arguments match the pmemlog functio...
8,866
21.448101
80
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/examples/libpmemobj/libart/arttree_examine.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2017, Intel Corporation */ /* * Copyright 2016, FUJITSU TECHNOLOGY SOLUTIONS GMBH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistribut...
12,509
24.478615
78
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/examples/libpmemobj/libart/arttree_structures.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2017, Intel Corporation */ /* * Copyright 2016, FUJITSU TECHNOLOGY SOLUTIONS GMBH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistribut...
14,768
22.898058
79
c
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/examples/libpmemobj/libart/arttree_structures.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2017, Intel Corporation */ /* * Copyright 2016, FUJITSU TECHNOLOGY SOLUTIONS GMBH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistribut...
5,923
25.927273
78
h
null
NearPMSW-main/nearpm/shadow/pmdk-sd/src/examples/libpmemobj/libart/arttree.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2017, Intel Corporation */ /* * Copyright 2016, FUJITSU TECHNOLOGY SOLUTIONS GMBH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistribut...
16,439
22.688761
78
c