Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
15a3c331
Commit
15a3c331
authored
Feb 16, 2006
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change MemSet to use long instead of int32, for better performance on
64-bit platforms. by ITAGAKI Takahiro
parent
422998d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
src/include/c.h
src/include/c.h
+13
-13
No files found.
src/include/c.h
View file @
15a3c331
...
...
@@ -12,7 +12,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/c.h,v 1.19
5 2006/02/03 13:53:15 momjian
Exp $
* $PostgreSQL: pgsql/src/include/c.h,v 1.19
6 2006/02/16 23:23:50 petere
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -603,8 +603,8 @@ typedef NameData *Name;
} while (0)
/* Get a bit mask of the bits set in non-
int32
aligned addresses */
#define
INT_ALIGN_MASK (sizeof(int32
) - 1)
/* Get a bit mask of the bits set in non-
long
aligned addresses */
#define
LONG_ALIGN_MASK (sizeof(long
) - 1)
/*
* MemSet
...
...
@@ -624,8 +624,8 @@ typedef NameData *Name;
int _val = (val); \
Size _len = (len); \
\
if ((((long) _vstart) &
INT
_ALIGN_MASK) == 0 && \
(_len &
INT
_ALIGN_MASK) == 0 && \
if ((((long) _vstart) &
LONG
_ALIGN_MASK) == 0 && \
(_len &
LONG
_ALIGN_MASK) == 0 && \
_val == 0 && \
_len <= MEMSET_LOOP_LIMIT && \
/* \
...
...
@@ -634,8 +634,8 @@ typedef NameData *Name;
*/
\
MEMSET_LOOP_LIMIT != 0) \
{ \
int32 *_start = (int32
*) _vstart; \
int32 *_stop = (int32
*) ((char *) _start + _len); \
long *_start = (long
*) _vstart; \
long *_stop = (long
*) ((char *) _start + _len); \
while (_start < _stop) \
*_start++ = 0; \
} \
...
...
@@ -652,16 +652,16 @@ typedef NameData *Name;
#define MemSetAligned(start, val, len) \
do \
{ \
int32 *_start = (int32
*) (start); \
long *_start = (long
*) (start); \
int _val = (val); \
Size _len = (len); \
\
if ((_len &
INT
_ALIGN_MASK) == 0 && \
if ((_len &
LONG
_ALIGN_MASK) == 0 && \
_val == 0 && \
_len <= MEMSET_LOOP_LIMIT && \
MEMSET_LOOP_LIMIT != 0) \
{ \
int32 *_stop = (int32
*) ((char *) _start + _len); \
long *_stop = (long
*) ((char *) _start + _len); \
while (_start < _stop) \
*_start++ = 0; \
} \
...
...
@@ -679,7 +679,7 @@ typedef NameData *Name;
* this approach.
*/
#define MemSetTest(val, len) \
( ((len) &
INT
_ALIGN_MASK) == 0 && \
( ((len) &
LONG
_ALIGN_MASK) == 0 && \
(len) <= MEMSET_LOOP_LIMIT && \
MEMSET_LOOP_LIMIT != 0 && \
(val) == 0 )
...
...
@@ -687,8 +687,8 @@ typedef NameData *Name;
#define MemSetLoop(start, val, len) \
do \
{ \
int32 * _start = (int32
*) (start); \
int32 * _stop = (int32
*) ((char *) _start + (Size) (len)); \
long * _start = (long
*) (start); \
long * _stop = (long
*) ((char *) _start + (Size) (len)); \
\
while (_start < _stop) \
*_start++ = 0; \
...
...
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