Skip to content

Commit b3fa43f

Browse files
committed
rt: Remove rust_exchange_alloc
1 parent 74b2d9e commit b3fa43f

File tree

4 files changed

+0
-71
lines changed

4 files changed

+0
-71
lines changed

mk/rt.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ RUNTIME_CXXS_$(1)_$(2) := \
7575
rt/rust_gc_metadata.cpp \
7676
rt/rust_util.cpp \
7777
rt/rust_log.cpp \
78-
rt/rust_exchange_alloc.cpp \
7978
rt/isaac/randport.cpp \
8079
rt/miniz.cpp \
8180
rt/rust_abi.cpp \

src/rt/rust_exchange_alloc.cpp

Lines changed: 0 additions & 35 deletions
This file was deleted.

src/rt/rust_exchange_alloc.h

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/rt/rust_util.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#define RUST_UTIL_H
1313

1414
#include <limits.h>
15-
#include "rust_exchange_alloc.h"
1615
#include "rust_type.h"
1716

1817
extern struct type_desc str_body_tydesc;
@@ -57,16 +56,6 @@ vec_data(rust_vec *v) {
5756
return reinterpret_cast<T*>(v->data);
5857
}
5958

60-
inline void reserve_vec_exact(rust_vec** vpp,
61-
size_t size) {
62-
if (size > (*vpp)->alloc) {
63-
rust_exchange_alloc exchange_alloc;
64-
*vpp = (rust_vec*)exchange_alloc
65-
.realloc(*vpp, size + sizeof(rust_vec));
66-
(*vpp)->alloc = size;
67-
}
68-
}
69-
7059
typedef rust_vec rust_str;
7160

7261
inline size_t get_box_size(size_t body_size, size_t body_align) {

0 commit comments

Comments
 (0)