Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
abc
Commits
c58dd062
Commit
c58dd062
authored
Jan 27, 2015
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing reported memory alignment issue.
parent
0f22046b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletions
+16
-1
Makefile
+4
-1
src/aig/aig/aigMem.c
+12
-0
No files found.
Makefile
View file @
c58dd062
...
...
@@ -44,7 +44,10 @@ arch_flags : arch_flags.c
ARCHFLAGS
?=
$(
shell
$(CC)
arch_flags.c
-o
arch_flags
&&
./arch_flags
)
OPTFLAGS
?=
-g
-O
#-DABC_NAMESPACE=xxx
CFLAGS
+=
-Wall
-Wno-unused-function
-Wno-write-strings
-Wno-sign-compare
$(OPTFLAGS)
$(ARCHFLAGS)
-Isrc
CFLAGS
+=
-Wall
-Wno-unused-function
-Wno-write-strings
-Wno-sign-compare
$(OPTFLAGS)
$(ARCHFLAGS)
-Isrc
ifneq
($(findstring
arm,$(shell
uname
-m)),)
CFLAGS
+=
-DABC_MEMALIGN
=
4
endif
# Set -Wno-unused-bug-set-variable for GCC 4.6.0 and greater only
ifneq
($(or
$(findstring
gcc,$(CC)),$(findstring
g++,$(CC))),)
...
...
src/aig/aig/aigMem.c
View file @
c58dd062
...
...
@@ -366,6 +366,10 @@ void Aig_MmFlexStop( Aig_MmFlex_t * p, int fVerbose )
char
*
Aig_MmFlexEntryFetch
(
Aig_MmFlex_t
*
p
,
int
nBytes
)
{
char
*
pTemp
;
#ifdef ABC_MEMALIGN
// extend size to max alignment
nBytes
+=
(
ABC_MEMALIGN
-
nBytes
%
ABC_MEMALIGN
)
%
ABC_MEMALIGN
;
#endif
// check if there are still free entries
if
(
p
->
pCurrent
==
NULL
||
p
->
pCurrent
+
nBytes
>
p
->
pEnd
)
{
// need to allocate more entries
...
...
@@ -535,6 +539,10 @@ char * Aig_MmStepEntryFetch( Aig_MmStep_t * p, int nBytes )
{
if
(
nBytes
==
0
)
return
NULL
;
#ifdef ABC_MEMALIGN
// extend size to max alignment
nBytes
+=
(
ABC_MEMALIGN
-
nBytes
%
ABC_MEMALIGN
)
%
ABC_MEMALIGN
;
#endif
if
(
nBytes
>
p
->
nMapSize
)
{
if
(
p
->
nChunks
==
p
->
nChunksAlloc
)
...
...
@@ -564,6 +572,10 @@ void Aig_MmStepEntryRecycle( Aig_MmStep_t * p, char * pEntry, int nBytes )
{
if
(
nBytes
==
0
)
return
;
#ifdef ABC_MEMALIGN
// extend size to max alignment
nBytes
+=
(
ABC_MEMALIGN
-
nBytes
%
ABC_MEMALIGN
)
%
ABC_MEMALIGN
;
#endif
if
(
nBytes
>
p
->
nMapSize
)
{
// ABC_FREE( pEntry );
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment