Update README
This commit is contained in:
parent
1311f3b3fb
commit
98c6cad0e9
6
README
6
README
@ -9,15 +9,15 @@ still missing,including:
|
|||||||
The original versions of __syscall4(),__syscall5() and __syscall6()
|
The original versions of __syscall4(),__syscall5() and __syscall6()
|
||||||
don't work.They are replaced by assembly implemention in
|
don't work.They are replaced by assembly implemention in
|
||||||
/src/internal/x86_64/syscall.S
|
/src/internal/x86_64/syscall.S
|
||||||
- math library is removed momently.
|
- math library has been use the pure C implementation
|
||||||
Because some missing floating-point features of TinyCC.I am working
|
Because some missing floating-point features of TinyCC.
|
||||||
on completing.
|
|
||||||
- @PLT dynamic linking function calls are removed.
|
- @PLT dynamic linking function calls are removed.
|
||||||
TinyCC does not have the feature.Dynamic linking library(.so)
|
TinyCC does not have the feature.Dynamic linking library(.so)
|
||||||
is expected not to work.
|
is expected not to work.
|
||||||
|
|
||||||
Some features had been removed momently but now they are usable,including:
|
Some features had been removed momently but now they are usable,including:
|
||||||
- fenv library(maybe applying a patch to TinyCC is needed)
|
- fenv library(maybe applying a patch to TinyCC is needed)
|
||||||
|
- math library(using C implementation now)
|
||||||
|
|
||||||
To compile,simply run
|
To compile,simply run
|
||||||
./configure --target=x86_64 CC='tcc' AR='tcc -ar' RANLIB='echo' \
|
./configure --target=x86_64 CC='tcc' AR='tcc -ar' RANLIB='echo' \
|
||||||
|
25
tests/malloc.c
Normal file
25
tests/malloc.c
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#include<assert.h>
|
||||||
|
#include<stdio.h>
|
||||||
|
#include<stdlib.h>
|
||||||
|
#include<stdint.h>
|
||||||
|
#include<string.h>
|
||||||
|
|
||||||
|
#define BLK_SIZE (2 << 10)
|
||||||
|
#define TEST_NUM (2 << 10)
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
uint8_t **slots = (uint8_t**)malloc(sizeof(uint8_t*) * TEST_NUM);
|
||||||
|
printf("%p\n",slots);
|
||||||
|
assert(slots);
|
||||||
|
for (int i = 0;i < TEST_NUM;i++) {
|
||||||
|
slots[i] = (uint8_t*)malloc(BLK_SIZE);
|
||||||
|
assert(slots[i]);
|
||||||
|
memset(slots[i],(uint8_t)i,BLK_SIZE);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0;i < TEST_NUM;i++)
|
||||||
|
free(slots[i]);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user