URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
/* PR target/10067 */
|
/* PR target/10067 */
|
/* Originator: <dat94ali@ludat.lth.se> */
|
/* Originator: <dat94ali@ludat.lth.se> */
|
/* { dg-do compile { target sparc*-*-* } } */
|
/* { dg-do compile { target sparc*-*-* } } */
|
/* { dg-options "-O2 -mtune=supersparc" { target sparc64-*-* sparcv9-*-* } } */
|
/* { dg-options "-O2 -mtune=supersparc" { target sparc64-*-* sparcv9-*-* } } */
|
|
|
struct _reent;
|
struct _reent;
|
|
|
extern unsigned long __malloc_trim_threshold;
|
extern unsigned long __malloc_trim_threshold;
|
extern unsigned long __malloc_top_pad;
|
extern unsigned long __malloc_top_pad;
|
|
|
int _mallopt_r(struct _reent *reent_ptr, int param_number, int value)
|
int _mallopt_r(struct _reent *reent_ptr, int param_number, int value)
|
{
|
{
|
__malloc_lock(reent_ptr);
|
__malloc_lock(reent_ptr);
|
|
|
switch(param_number)
|
switch(param_number)
|
{
|
{
|
case -1:
|
case -1:
|
__malloc_trim_threshold = value;
|
__malloc_trim_threshold = value;
|
__malloc_unlock(reent_ptr);
|
__malloc_unlock(reent_ptr);
|
return 1;
|
return 1;
|
|
|
case -2:
|
case -2:
|
__malloc_top_pad = value;
|
__malloc_top_pad = value;
|
__malloc_unlock(reent_ptr);
|
__malloc_unlock(reent_ptr);
|
return 1;
|
return 1;
|
|
|
case -3:
|
case -3:
|
__malloc_unlock(reent_ptr);
|
__malloc_unlock(reent_ptr);
|
return 1;
|
return 1;
|
|
|
case -4:
|
case -4:
|
__malloc_unlock(reent_ptr);
|
__malloc_unlock(reent_ptr);
|
return value == 0;
|
return value == 0;
|
|
|
default:
|
default:
|
__malloc_unlock(reent_ptr);
|
__malloc_unlock(reent_ptr);
|
return 0;
|
return 0;
|
}
|
}
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.