From 545310a9a963dbdf3b0f91087dc4fb7812bb31c9 Mon Sep 17 00:00:00 2001 From: Lars Hvam Date: Thu, 21 Nov 2024 14:38:09 +0100 Subject: [PATCH 1/2] update npm packages --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 9bc92040..c4d60ba1 100644 --- a/package.json +++ b/package.json @@ -13,10 +13,10 @@ }, "license": "MIT", "dependencies": { - "@abaplint/cli": "^2.113.52", + "@abaplint/cli": "^2.113.66", "@abaplint/database-sqlite": "^2.10.20", "@abaplint/runtime": "^2.10.20", "@abaplint/transpiler-cli": "^2.10.20", - "0x": "^5.7.0" + "0x": "^5.8.0" } } From d91f73129001ae15c28c5d6a82b3c980f8383cea Mon Sep 17 00:00:00 2001 From: Lars Hvam Date: Tue, 3 Dec 2024 08:46:51 +0100 Subject: [PATCH 2/2] add cl_abap_memory_utilities --- package.json | 6 +-- src/memory/abap_msize.dtel.xml | 24 +++++++++++ src/memory/cl_abap_memory_utilities.clas.abap | 40 +++++++++++++++++++ src/memory/cl_abap_memory_utilities.clas.xml | 16 ++++++++ 4 files changed, 83 insertions(+), 3 deletions(-) create mode 100644 src/memory/abap_msize.dtel.xml create mode 100644 src/memory/cl_abap_memory_utilities.clas.abap create mode 100644 src/memory/cl_abap_memory_utilities.clas.xml diff --git a/package.json b/package.json index c4d60ba1..487ff28c 100644 --- a/package.json +++ b/package.json @@ -13,10 +13,10 @@ }, "license": "MIT", "dependencies": { - "@abaplint/cli": "^2.113.66", + "@abaplint/cli": "^2.113.70", "@abaplint/database-sqlite": "^2.10.20", - "@abaplint/runtime": "^2.10.20", - "@abaplint/transpiler-cli": "^2.10.20", + "@abaplint/runtime": "^2.10.21", + "@abaplint/transpiler-cli": "^2.10.21", "0x": "^5.8.0" } } diff --git a/src/memory/abap_msize.dtel.xml b/src/memory/abap_msize.dtel.xml new file mode 100644 index 00000000..41a3305a --- /dev/null +++ b/src/memory/abap_msize.dtel.xml @@ -0,0 +1,24 @@ + + + + + + ABAP_MSIZE + E + 26 + 10 + 20 + 40 + Memory Size + Memory Size + Memory Siz + Memory Size + Memory Size + E + DEC + 000020 + 000026 + + + + diff --git a/src/memory/cl_abap_memory_utilities.clas.abap b/src/memory/cl_abap_memory_utilities.clas.abap new file mode 100644 index 00000000..199f14fe --- /dev/null +++ b/src/memory/cl_abap_memory_utilities.clas.abap @@ -0,0 +1,40 @@ +CLASS cl_abap_memory_utilities DEFINITION PUBLIC. + PUBLIC SECTION. + CLASS-METHODS get_memory_size_of_object + IMPORTING + object TYPE any + EXPORTING + bound_size_alloc TYPE abap_msize + bound_size_used TYPE abap_msize + referenced_size_alloc TYPE abap_msize + referenced_size_used TYPE abap_msize + is_part_of_non_trivial_szk TYPE c + szk_size_alloc TYPE abap_msize + szk_size_used TYPE abap_msize + low_mem TYPE c + is_in_shared_memory TYPE c + sizeof_alloc TYPE abap_msize + sizeof_used TYPE abap_msize. + + CLASS-METHODS get_peak_used_size + EXPORTING + size TYPE abap_msize. + + CLASS-METHODS do_garbage_collection. +ENDCLASS. + +CLASS cl_abap_memory_utilities IMPLEMENTATION. + + METHOD do_garbage_collection. + RETURN. " todo, implement method + ENDMETHOD. + + METHOD get_peak_used_size. + RETURN. " todo, implement method + ENDMETHOD. + + METHOD get_memory_size_of_object. + RETURN. " todo, implement method + ENDMETHOD. + +ENDCLASS. \ No newline at end of file diff --git a/src/memory/cl_abap_memory_utilities.clas.xml b/src/memory/cl_abap_memory_utilities.clas.xml new file mode 100644 index 00000000..e8af798f --- /dev/null +++ b/src/memory/cl_abap_memory_utilities.clas.xml @@ -0,0 +1,16 @@ + + + + + + CL_ABAP_MEMORY_UTILITIES + E + CL_ABAP_MEMORY_UTILITIES + 1 + X + X + X + + + + \ No newline at end of file