-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
nhathuyenqt
committed
Jan 23, 2024
1 parent
a4882c0
commit 4271b50
Showing
2,465 changed files
with
602,985 additions
and
6 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[package] | ||
name = "sc-allocator" | ||
version = "4.1.0-dev" | ||
authors = ["Parity Technologies <[email protected]>"] | ||
edition = "2021" | ||
license = "Apache-2.0" | ||
homepage = "https://substrate.io" | ||
repository = "https://github.com/paritytech/substrate/" | ||
description = "Collection of allocator implementations." | ||
documentation = "https://docs.rs/sc-allocator" | ||
readme = "README.md" | ||
|
||
[package.metadata.docs.rs] | ||
targets = ["x86_64-unknown-linux-gnu"] | ||
|
||
[dependencies] | ||
log = "0.4.17" | ||
thiserror = "1.0.30" | ||
sp-core = { version = "21.0.0", path = "../../primitives/core" } | ||
sp-wasm-interface = { version = "14.0.0", path = "../../primitives/wasm-interface" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Collection of allocator implementations. | ||
|
||
This crate provides the following allocator implementations: | ||
- A freeing-bump allocator: [`FreeingBumpHeapAllocator`](https://docs.rs/sc-allocator/latest/sc_allocator/struct.FreeingBumpHeapAllocator.html) | ||
|
||
License: Apache-2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// This file is part of Substrate. | ||
|
||
// Copyright (C) Parity Technologies (UK) Ltd. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
/// The error type used by the allocators. | ||
#[derive(thiserror::Error, Debug, PartialEq)] | ||
pub enum Error { | ||
/// Someone tried to allocate more memory than the allowed maximum per allocation. | ||
#[error("Requested allocation size is too large")] | ||
RequestedAllocationTooLarge, | ||
/// Allocator run out of space. | ||
#[error("Allocator ran out of space")] | ||
AllocatorOutOfSpace, | ||
/// The client passed a memory instance which is smaller than previously observed. | ||
#[error("Shrinking of the underlying memory is observed")] | ||
MemoryShrinked, | ||
/// Some other error occurred. | ||
#[error("Other: {0}")] | ||
Other(&'static str), | ||
} |
Oops, something went wrong.