lz4.c (e25152834cdf3b353892835a4f3b157e066a8ed4) | lz4.c (975e1c1ce64afd5a2ed1647c80888b0fb6c132ae) |
---|---|
1/* 2 * LZ4 - Fast LZ compression algorithm 3 * Header File 4 * Copyright (C) 2011-2013, Yann Collet. 5 * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions are --- 1010 unchanged lines hidden (view full) --- 1019 return (int)(((char *)op) - dest); 1020 1021 /* write overflow error detected */ 1022 _output_error: 1023 return (int)(-(((const char *)ip) - source)); 1024} 1025 1026#if defined(_KERNEL) || defined(_FAKE_KERNEL) | 1/* 2 * LZ4 - Fast LZ compression algorithm 3 * Header File 4 * Copyright (C) 2011-2013, Yann Collet. 5 * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions are --- 1010 unchanged lines hidden (view full) --- 1019 return (int)(((char *)op) - dest); 1020 1021 /* write overflow error detected */ 1022 _output_error: 1023 return (int)(-(((const char *)ip) - source)); 1024} 1025 1026#if defined(_KERNEL) || defined(_FAKE_KERNEL) |
1027extern void | 1027void |
1028lz4_init(void) 1029{ 1030 1031#if HEAPMODE 1032 lz4_ctx_cache = kmem_cache_create("lz4_ctx", sizeof(struct refTables), 1033 0, NULL, NULL, NULL, NULL, NULL, 0); 1034#endif 1035} 1036 | 1028lz4_init(void) 1029{ 1030 1031#if HEAPMODE 1032 lz4_ctx_cache = kmem_cache_create("lz4_ctx", sizeof(struct refTables), 1033 0, NULL, NULL, NULL, NULL, NULL, 0); 1034#endif 1035} 1036 |
1037extern void | 1037void |
1038lz4_fini(void) 1039{ 1040 1041#if HEAPMODE 1042 kmem_cache_destroy(lz4_ctx_cache); 1043#endif 1044} 1045#endif /* _KERNEL || _FAKE_KERNEL */ | 1038lz4_fini(void) 1039{ 1040 1041#if HEAPMODE 1042 kmem_cache_destroy(lz4_ctx_cache); 1043#endif 1044} 1045#endif /* _KERNEL || _FAKE_KERNEL */ |