-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated some code in base library. Not complete.
- Loading branch information
Showing
13 changed files
with
59 additions
and
13 deletions.
There are no files selected for viewing
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
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
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
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
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
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,11 @@ | ||
# Copyright 2024 AQ author, All Rights Reserved. | ||
# This program is licensed under the AQ License. You can find the AQ license in | ||
# the root directory. | ||
|
||
cmake_minimum_required(VERSION 3.10) | ||
|
||
include_directories(${PROJECT_SOURCE_DIR}) | ||
|
||
set(SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/memory.c) | ||
|
||
add_library(AqvmBaseMemory STATIC ${SOURCES}) |
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,18 @@ | ||
// Copyright 2024 AQ author, All Rights Reserved. | ||
// This program is licensed under the AQ License. You can find the AQ license in | ||
// the root directory. | ||
|
||
#include "aqvm/base/memory/memory.h" | ||
|
||
#include <stddef.h> | ||
|
||
void* AqvmBaseMemory_AqvmBaseMemory_malloc(size_t size) { return AqvmBaseMemory_malloc(size); } | ||
|
||
int AqvmBaseMemory_free(void* ptr) { | ||
if (ptr == NULL) { | ||
// TODO | ||
return -1; | ||
} | ||
free(ptr); | ||
return 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,14 @@ | ||
// Copyright 2024 AQ author, All Rights Reserved. | ||
// This program is licensed under the AQ License. You can find the AQ license in | ||
// the root directory. | ||
|
||
#ifndef AQ_AQVM_BASE_MEMORY_MEMORY_H_ | ||
#define AQ_AQVM_BASE_MEMORY_MEMORY_H_ | ||
|
||
#include <stddef.h> | ||
|
||
void* AqvmBaseMemory_AqvmBaseMemory_malloc(size_t size); | ||
|
||
int AqvmBaseMemory_free(void* ptr); | ||
|
||
#endif |
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
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
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
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
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