summaryrefslogtreecommitdiff
path: root/zap/source/amd64/mem/memcnt.c
diff options
context:
space:
mode:
Diffstat (limited to 'zap/source/amd64/mem/memcnt.c')
-rw-r--r--zap/source/amd64/mem/memcnt.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/zap/source/amd64/mem/memcnt.c b/zap/source/amd64/mem/memcnt.c
deleted file mode 100644
index c22abca..0000000
--- a/zap/source/amd64/mem/memcnt.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- Copyright 2022 Gabriel Jensen.
- This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
- If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
-*/
-
-#include <zap/priv.h>
-
-#include <zap/mem.h>
-
-zap_sz zap_memcnt(void const * const _ptr,zap_sz const _sz,zap_sz const _num,zap_bool (* const _fn)(void const *)) {
- unsigned char const * addr = _ptr;
- zap_sz const numbyte = _num * _sz;
- unsigned char const * const afterbuf = addr + numbyte;
- zap_sz num = 0x0u;
- for (;addr != afterbuf;addr += _sz) {
- if (_fn(addr)) {
- ++num;
- }
- }
- return num;
-}