Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion arch/m68k-all/include/aros/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#define AROS_PTRALIGN 2 /* Alignment for PTR */
#define AROS_IPTRALIGN 2 /* Alignment for IPTR */
#define AROS_DOUBLEALIGN 2 /* Alignment for double */
#define AROS_WORSTALIGN 32 /* Worst case alignment - ApolloOS = 32 Bytes */
#define AROS_WORSTALIGN 4 /* Worst case alignment - ApolloOS = 32 Bytes */

#define AROS_SLOWSTACKFORMAT 1

Expand Down
2 changes: 1 addition & 1 deletion compiler/include/aros/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
#define AROS_PTRALIGN 8 /* Alignment for PTR */
#define AROS_IPTRALIGN 8 /* Alignment for IPTR */
#define AROS_DOUBLEALIGN 8 /* Alignment for double */
#define AROS_WORSTALIGN 32 /* Worst case alignment */
#define AROS_WORSTALIGN 4 /* Worst case alignment */
#define AROS_STACKALIGN 16 /* Clean stack alignment */
#elif defined __arm__
# if defined __thumb2__
Expand Down
2 changes: 1 addition & 1 deletion compiler/include/exec/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct MemChunk
};

/* Total size of struct MemChunk, including padding */
#define MEMCHUNK_TOTAL 32 //[WD] ApolloOS is set to 32 Byte Memory Boundary from Core 11350+ | (AROS_WORSTALIGN > sizeof(struct MemChunk) ? AROS_WORSTALIGN : sizeof(struct MemChunk))
#define MEMCHUNK_TOTAL (AROS_WORSTALIGN > sizeof(struct MemChunk) ? AROS_WORSTALIGN : sizeof(struct MemChunk))
/* Total size of struct MemHeader, including padding */
#define MEMHEADER_TOTAL (AROS_ROUNDUP2(sizeof(struct MemHeader), MEMCHUNK_TOTAL))

Expand Down
4 changes: 3 additions & 1 deletion rom/exec/allocate.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
{
AROS_LIBFUNC_INIT

#ifdef HANDLE_MANAGED_MEM
if ((freeList->mh_Node.ln_Type == NT_MEMORY) && IsManagedMem(freeList))
{
struct MemHeaderExt *mhe = (struct MemHeaderExt *)freeList;
Expand All @@ -94,7 +95,8 @@
return NULL;
}
else
{
#endif
{
struct TraceLocation tp = CURRENT_LOCATION("Allocate");
APTR res;

Expand Down
4 changes: 3 additions & 1 deletion rom/exec/allocpooled.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
if(!memSize)
return NULL;

#ifdef HANDLE_MANAGED_MEM
if (IsManagedMem(mhe))
{
ULONG poolrequirements = (ULONG)(IPTR)mhe->mhe_MemHeader.mh_First;
Expand All @@ -85,7 +86,8 @@
return NULL;
}
else
{
#endif
{
struct TraceLocation tp = CURRENT_LOCATION("AllocPooled");
struct Pool *pool = poolHeader + MEMHEADER_TOTAL;

Expand Down
5 changes: 3 additions & 2 deletions rom/exec/allocvecpooled.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
/* 0-sized allocation results in returning NULL (API guarantee) */
if(!memSize)
return NULL;

#ifdef HANDLE_MANAGED_MEM
if (IsManagedMem(mhe))
{
ULONG poolrequirements = (ULONG)(IPTR)mhe->mhe_MemHeader.mh_First;
Expand All @@ -67,7 +67,8 @@
return NULL;
}
else
{
#endif
{
IPTR *memory;

if (poolHeader == NULL) return NULL;
Expand Down
4 changes: 3 additions & 1 deletion rom/exec/createpool.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@
* If the pool is in managed memory, don't bother any further setup. The
* pool should do the rest self.
*/
#ifdef HANDLE_MANAGED_MEM
if (IsManagedMem(firstPuddle))
{
D(bug("Managed pool\n");)
Expand All @@ -152,7 +153,8 @@
firstPuddle->mh_First = (APTR)(IPTR)requirements;
}
else
{
#endif
{
/*
* Add the puddle to the list (yes, contained in itself).
* This is the first puddle so it's safe to use AddTail() here.
Expand Down
4 changes: 3 additions & 1 deletion rom/exec/deallocate.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
{
AROS_LIBFUNC_INIT

#ifdef HANDLE_MANAGED_MEM
if ((freeList->mh_Node.ln_Type == NT_MEMORY) && IsManagedMem(freeList))
{
struct MemHeaderExt *mhe = (struct MemHeaderExt *)freeList;
Expand All @@ -66,7 +67,8 @@
mhe->mhe_Free(mhe, memoryBlock, byteSize);
}
else
{
#endif
{
struct TraceLocation tp = CURRENT_LOCATION("Deallocate");

/* If there is no memory free nothing */
Expand Down
4 changes: 3 additions & 1 deletion rom/exec/deletepool.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,14 @@
{
struct TraceLocation tp = CURRENT_LOCATION("DeletePool");

#ifdef HANDLE_MANAGED_MEM
if (IsManagedMem(poolHeader))
{
/* Do nothing, everything is handled in FreeMemHeader */
}
else
{
#endif
{
struct Pool *pool = poolHeader + MEMHEADER_TOTAL;
struct Node *p, *p2; /* Avoid casts */

Expand Down
4 changes: 3 additions & 1 deletion rom/exec/freepooled.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,15 @@
if(!memSize || !memory)
return;

#ifdef HANDLE_MANAGED_MEM
if (IsManagedMem(mhe))
{
if (mhe->mhe_Free)
mhe->mhe_Free(mhe, memory, memSize);
}
else
{
#endif
{
struct TraceLocation tp = CURRENT_LOCATION("FreePooled");

InternalFreePooled(poolHeader, memory, memSize, &tp, SysBase);
Expand Down
4 changes: 3 additions & 1 deletion rom/exec/freevecpooled.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,15 @@
if(!memory)
return;

#ifdef HANDLE_MANAGED_MEM
if (IsManagedMem(mhe))
{
if (mhe->mhe_FreeVec)
mhe->mhe_FreeVec(mhe, memory);
}
else
{
#endif
{
if (memory != NULL)
{
IPTR *real = (IPTR *) memory;
Expand Down
Loading