01ecf332ff
* Initial import of wear-leveling algorithm. * Alignment. * Docs tweaks. * Lock/unlock. * Update quantum/wear_leveling/wear_leveling_internal.h Co-authored-by: Stefan Kerkmann <karlk90@pm.me> * More tests, fix issue with consolidation when unlocked. * More tests. * Review comments. * Add plumbing for FNV1a. * Another test checking that checksum mismatch clears the cache. * Check that the write log still gets played back. Co-authored-by: Stefan Kerkmann <karlk90@pm.me>
15 lines
565 B
C
15 lines
565 B
C
// Copyright 2022 Nick Brassel (@tzarc)
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
#include "fnv.h"
|
|
|
|
// This library was originally sourced from:
|
|
// http://www.isthe.com/chongo/tech/comp/fnv/index.html
|
|
//
|
|
// Version at the time of retrieval on 2022-06-26: v5.0.3
|
|
|
|
_Static_assert(sizeof(long long) == 8, "long long should be 64 bits");
|
|
_Static_assert(sizeof(unsigned long long) == 8, "unsigned long long should be 64 bits");
|
|
|
|
_Static_assert(sizeof(Fnv32_t) == 4, "Fnv32_t should be 32 bits");
|
|
_Static_assert(sizeof(Fnv64_t) == 8, "Fnv64_t should be 64 bits");
|