Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
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
nexedi
MariaDB
Commits
76b09dd5
Commit
76b09dd5
authored
Oct 22, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix c++ style comments in .h and .c files
compilation problems on some platforms'
parent
25f1344f
Changes
13
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
252 additions
and
242 deletions
+252
-242
ndb/include/kernel/BlockNumbers.h
ndb/include/kernel/BlockNumbers.h
+3
-3
ndb/include/kernel/GlobalSignalNumbers.h
ndb/include/kernel/GlobalSignalNumbers.h
+99
-99
ndb/include/kernel/ndb_limits.h
ndb/include/kernel/ndb_limits.h
+5
-5
ndb/include/kernel/trigger_definitions.h
ndb/include/kernel/trigger_definitions.h
+6
-6
ndb/include/mgmapi/mgmapi.h
ndb/include/mgmapi/mgmapi.h
+77
-67
ndb/include/portlib/NdbCondition.h
ndb/include/portlib/NdbCondition.h
+31
-31
ndb/include/portlib/PortDefs.h
ndb/include/portlib/PortDefs.h
+20
-20
ndb/include/portlib/prefetch.h
ndb/include/portlib/prefetch.h
+2
-2
ndb/src/common/portlib/NdbDaemon.c
ndb/src/common/portlib/NdbDaemon.c
+1
-1
ndb/src/common/portlib/NdbMem.c
ndb/src/common/portlib/NdbMem.c
+1
-1
ndb/src/common/portlib/NdbThread.c
ndb/src/common/portlib/NdbThread.c
+2
-2
ndb/src/common/portlib/memtest.c
ndb/src/common/portlib/memtest.c
+4
-4
ndb/src/common/util/basestring_vsnprintf.c
ndb/src/common/util/basestring_vsnprintf.c
+1
-1
No files found.
ndb/include/kernel/BlockNumbers.h
View file @
76b09dd5
...
...
@@ -20,13 +20,13 @@
#include <kernel_types.h>
#include <RefConvert.hpp>
/
/ 240
/
* 240 */
#define MIN_API_BLOCK_NO 0x8000
/
/ 2047
/
* 2047 */
#define API_PACKED 0x07ff
/
/ 4002
/
* 4002 */
#define API_CLUSTERMGR 0x0FA2
#define BACKUP 0xF4
...
...
ndb/include/kernel/GlobalSignalNumbers.h
View file @
76b09dd5
This diff is collapsed.
Click to expand it.
ndb/include/kernel/ndb_limits.h
View file @
76b09dd5
...
...
@@ -50,7 +50,7 @@
**/
#define MAX_TUPLES_PER_PAGE 8191
#define MAX_TUPLES_BITS 13
/* 13 bits = 8191 tuples per page */
/
/#define MAX_NO_OF_TUPLEKEY 16 Not currently used
/
*#define MAX_NO_OF_TUPLEKEY 16 Not currently used */
#define MAX_TABLES 1600
#define MAX_TAB_NAME_SIZE 128
#define MAX_ATTR_NAME_SIZE 32
...
...
@@ -108,13 +108,13 @@
/*
* Ordered index constants. Make configurable per index later.
*/
#define MAX_TTREE_NODE_SIZE 64
// total words in node
#define MAX_TTREE_PREF_SIZE 4
// words in min prefix
#define MAX_TTREE_NODE_SLACK 2
// diff between max and min occupancy
#define MAX_TTREE_NODE_SIZE 64
/* total words in node */
#define MAX_TTREE_PREF_SIZE 4
/* words in min prefix */
#define MAX_TTREE_NODE_SLACK 2
/* diff between max and min occupancy */
/*
* Blobs.
*/
#define NDB_BLOB_HEAD_SIZE 2
// sizeof(NdbBlob::Head) >> 2
#define NDB_BLOB_HEAD_SIZE 2
/* sizeof(NdbBlob::Head) >> 2 */
#endif
ndb/include/kernel/trigger_definitions.h
View file @
76b09dd5
...
...
@@ -47,11 +47,11 @@ struct TriggerType {
struct
TriggerActionTime
{
enum
Value
{
TA_BEFORE
=
0
,
/
/ Immediate, before operation
TA_AFTER
=
1
,
/
/ Immediate, after operation
TA_DEFERRED
=
2
,
/
/ Before commit
TA_DETACHED
=
3
,
/
/ After commit in a separate transaction, NYI
TA_CUSTOM
=
4
/
/ Hardcoded per TriggerType
TA_BEFORE
=
0
,
/
* Immediate, before operation */
TA_AFTER
=
1
,
/
* Immediate, after operation */
TA_DEFERRED
=
2
,
/
* Before commit */
TA_DETACHED
=
3
,
/
* After commit in a separate transaction, NYI */
TA_CUSTOM
=
4
/
* Hardcoded per TriggerType */
};
};
...
...
@@ -60,7 +60,7 @@ struct TriggerEvent {
TE_INSERT
=
0
,
TE_DELETE
=
1
,
TE_UPDATE
=
2
,
TE_CUSTOM
=
3
/
/ Hardcoded per TriggerType
TE_CUSTOM
=
3
/
* Hardcoded per TriggerType */
};
};
...
...
ndb/include/mgmapi/mgmapi.h
View file @
76b09dd5
...
...
@@ -64,32 +64,32 @@ extern "C" {
* NDB Cluster node types
*/
enum
ndb_mgm_node_type
{
NDB_MGM_NODE_TYPE_UNKNOWN
=
-
1
,
/*/
< Node type not known*/
NDB_MGM_NODE_TYPE_API
=
NODE_TYPE_API
,
/*/
< An application node (API)*/
NDB_MGM_NODE_TYPE_NDB
=
NODE_TYPE_DB
,
/*/
< A database node (DB)*/
NDB_MGM_NODE_TYPE_MGM
=
NODE_TYPE_MGM
,
/*/< A managemen
t server node (MGM)*/
NDB_MGM_NODE_TYPE_REP
=
NODE_TYPE_REP
,
///< A replication node
NDB_MGM_NODE_TYPE_MIN
=
0
,
/*/
< Min valid value*/
NDB_MGM_NODE_TYPE_MAX
=
3
/*/
< Max valid value*/
NDB_MGM_NODE_TYPE_UNKNOWN
=
-
1
,
/*
< Node type not known*/
NDB_MGM_NODE_TYPE_API
=
NODE_TYPE_API
,
/*
< An application node (API)*/
NDB_MGM_NODE_TYPE_NDB
=
NODE_TYPE_DB
,
/*
< A database node (DB)*/
NDB_MGM_NODE_TYPE_MGM
=
NODE_TYPE_MGM
,
/*< A mgm
t server node (MGM)*/
NDB_MGM_NODE_TYPE_REP
=
NODE_TYPE_REP
,
/*< A replication node */
NDB_MGM_NODE_TYPE_MIN
=
0
,
/*
< Min valid value*/
NDB_MGM_NODE_TYPE_MAX
=
3
/*
< Max valid value*/
};
/**
* Database node status
*/
enum
ndb_mgm_node_status
{
NDB_MGM_NODE_STATUS_UNKNOWN
=
0
,
/
//< Node status not known
NDB_MGM_NODE_STATUS_NO_CONTACT
=
1
,
/
//< No contact with node
NDB_MGM_NODE_STATUS_NOT_STARTED
=
2
,
/
//< Has not run starting protocol
NDB_MGM_NODE_STATUS_STARTING
=
3
,
/
//< Is running starting protocol
NDB_MGM_NODE_STATUS_STARTED
=
4
,
/
//< Running
NDB_MGM_NODE_STATUS_SHUTTING_DOWN
=
5
,
/
//< Is shutting down
NDB_MGM_NODE_STATUS_RESTARTING
=
6
,
/
//< Is restarting
NDB_MGM_NODE_STATUS_SINGLEUSER
=
7
,
/
//< Maintenance mode
NDB_MGM_NODE_STATUS_RESUME
=
8
,
/
//< Resume mode
NDB_MGM_NODE_STATUS_MIN
=
0
,
/
//< Min valid value
NDB_MGM_NODE_STATUS_MAX
=
6
/
//< Max valid value
NDB_MGM_NODE_STATUS_UNKNOWN
=
0
,
/
*< Node status not known*/
NDB_MGM_NODE_STATUS_NO_CONTACT
=
1
,
/
*< No contact with node*/
NDB_MGM_NODE_STATUS_NOT_STARTED
=
2
,
/
*< Has not run starting protocol*/
NDB_MGM_NODE_STATUS_STARTING
=
3
,
/
*< Is running starting protocol*/
NDB_MGM_NODE_STATUS_STARTED
=
4
,
/
*< Running*/
NDB_MGM_NODE_STATUS_SHUTTING_DOWN
=
5
,
/
*< Is shutting down*/
NDB_MGM_NODE_STATUS_RESTARTING
=
6
,
/
*< Is restarting*/
NDB_MGM_NODE_STATUS_SINGLEUSER
=
7
,
/
*< Maintenance mode*/
NDB_MGM_NODE_STATUS_RESUME
=
8
,
/
*< Resume mode*/
NDB_MGM_NODE_STATUS_MIN
=
0
,
/
*< Min valid value*/
NDB_MGM_NODE_STATUS_MAX
=
6
/
*< Max valid value*/
};
/**
...
...
@@ -175,24 +175,27 @@ extern "C" {
* Structure returned by ndb_mgm_get_status
*/
struct
ndb_mgm_node_state
{
int
node_id
;
///< NDB Cluster node id
enum
ndb_mgm_node_type
node_type
;
///< Type of NDB Cluster node
enum
ndb_mgm_node_status
node_status
;
///< State of node
int
start_phase
;
///< Start phase.
///< @note Start phase is only
///< valid if
///< node_type is
///< NDB_MGM_NODE_TYPE_NDB and
///< node_status is
///< NDB_MGM_NODE_STATUS_STARTING
int
dynamic_id
;
///< Id for heartbeats and
///< master take-over
///< (only valid for DB nodes)
int
node_group
;
///< Node group of node
///< (only valid for DB nodes)
int
version
;
///< Internal version number
int
connect_count
;
///< No of times node has connected
///< or disconnected to the mgm srv
int
node_id
;
/*< NDB Cluster node id*/
enum
ndb_mgm_node_type
node_type
;
/*< Type of NDB Cluster node*/
enum
ndb_mgm_node_status
node_status
;
/*< State of node*/
int
start_phase
;
/*< Start phase.
*< @note Start phase is only
*< valid if
*< node_type is
*< NDB_MGM_NODE_TYPE_NDB and
*< node_status is
*< NDB_MGM_NODE_STATUS_STARTING
*/
int
dynamic_id
;
/*< Id for heartbeats and
*< master take-over
*< (only valid for DB nodes)
*/
int
node_group
;
/*< Node group of node
*< (only valid for DB nodes)*/
int
version
;
/*< Internal version number*/
int
connect_count
;
/*< No of times node has connected
*< or disconnected to the mgm srv
*/
char
connect_address
[
sizeof
(
"000.000.000.000"
)
+
1
];
};
...
...
@@ -200,9 +203,10 @@ extern "C" {
* Cluster status
*/
struct
ndb_mgm_cluster_state
{
int
no_of_nodes
;
///< No of entries in the
///< node_states array
struct
ndb_mgm_node_state
///< An array with node_states
int
no_of_nodes
;
/*< No of entries in the
*< node_states array
*/
struct
ndb_mgm_node_state
/*< An array with node_states*/
node_states
[
1
];
const
char
*
hostname
;
};
...
...
@@ -211,17 +215,18 @@ extern "C" {
* Default reply from the server
*/
struct
ndb_mgm_reply
{
int
return_code
;
///< 0 if successful,
///< otherwise error code.
char
message
[
256
];
///< Error or reply message.
int
return_code
;
/*< 0 if successful,
*< otherwise error code.
*/
char
message
[
256
];
/*< Error or reply message.*/
};
/**
* Default information types
*/
enum
ndb_mgm_info
{
NDB_MGM_INFO_CLUSTER
,
/
//< ?
NDB_MGM_INFO_CLUSTERLOG
/
//< Cluster log
NDB_MGM_INFO_CLUSTER
,
/
*< ?*/
NDB_MGM_INFO_CLUSTERLOG
/
*< Cluster log*/
};
/**
...
...
@@ -229,39 +234,44 @@ extern "C" {
* (Used only in the development of NDB Cluster.)
*/
enum
ndb_mgm_signal_log_mode
{
NDB_MGM_SIGNAL_LOG_MODE_IN
,
/
//< Log receiving signals
NDB_MGM_SIGNAL_LOG_MODE_OUT
,
/
//< Log sending signals
NDB_MGM_SIGNAL_LOG_MODE_INOUT
,
/
//< Log both sending/receiving
NDB_MGM_SIGNAL_LOG_MODE_OFF
/
//< Log off
NDB_MGM_SIGNAL_LOG_MODE_IN
,
/
*< Log receiving signals */
NDB_MGM_SIGNAL_LOG_MODE_OUT
,
/
*< Log sending signals*/
NDB_MGM_SIGNAL_LOG_MODE_INOUT
,
/
*< Log both sending/receiving*/
NDB_MGM_SIGNAL_LOG_MODE_OFF
/
*< Log off*/
};
/**
* Log severities (used to filter the cluster log)
*/
enum
ndb_mgm_clusterlog_level
{
NDB_MGM_CLUSTERLOG_OFF
=
0
,
///< Cluster log off
NDB_MGM_CLUSTERLOG_DEBUG
=
1
,
///< Used in NDB Cluster
///< developement
NDB_MGM_CLUSTERLOG_INFO
=
2
,
///< Informational messages
NDB_MGM_CLUSTERLOG_WARNING
=
3
,
///< Conditions that are not
///< error condition, but
///< might require handling
NDB_MGM_CLUSTERLOG_ERROR
=
4
,
///< Conditions that should be
///< corrected
NDB_MGM_CLUSTERLOG_CRITICAL
=
5
,
///< Critical conditions, like
///< device errors or out of
///< resources
NDB_MGM_CLUSTERLOG_ALERT
=
6
,
///< A condition that should be
///< corrected immediately,
///< such as a corrupted system
NDB_MGM_CLUSTERLOG_ALL
=
7
///< All severities on
NDB_MGM_CLUSTERLOG_OFF
=
0
,
/*< Cluster log off*/
NDB_MGM_CLUSTERLOG_DEBUG
=
1
,
/*< Used in NDB Cluster
*< developement
*/
NDB_MGM_CLUSTERLOG_INFO
=
2
,
/*< Informational messages*/
NDB_MGM_CLUSTERLOG_WARNING
=
3
,
/*< Conditions that are not
*< error condition, but
*< might require handling
*/
NDB_MGM_CLUSTERLOG_ERROR
=
4
,
/*< Conditions that should be
*< corrected
*/
NDB_MGM_CLUSTERLOG_CRITICAL
=
5
,
/*< Critical conditions, like
*< device errors or out of
*< resources
*/
NDB_MGM_CLUSTERLOG_ALERT
=
6
,
/*< A condition that should be
*< corrected immediately,
*< such as a corrupted system
*/
NDB_MGM_CLUSTERLOG_ALL
=
7
/*< All severities on*/
};
/**
* Log categories
*/
enum
ndb_mgm_event_category
{
NDB_MGM_ILLEGAL_EVENT_CATEGORY
=
-
1
,
/
//
< Invalid
NDB_MGM_ILLEGAL_EVENT_CATEGORY
=
-
1
,
/
*
< Invalid
/**
* Events during all kinds of startups
*/
...
...
ndb/include/portlib/NdbCondition.h
View file @
76b09dd5
...
...
@@ -26,21 +26,21 @@ extern "C" {
struct
NdbCondition
;
/*
//
Create a condition
//
//
* returnvalue: pointer to the condition structure
*/
/*
*
*
Create a condition
*
* returnvalue: pointer to the condition structure
*/
struct
NdbCondition
*
NdbCondition_Create
(
void
);
/*
//
Wait for a condition, allows a thread to wait for
//
a condition and atomically releases the associated mutex.
//
//
* p_cond: pointer to the condition structure
//
* p_mutex: pointer to the mutex structure
//
* returnvalue: 0 = succeeded, 1 = failed
*/
/*
*
*
Wait for a condition, allows a thread to wait for
*
a condition and atomically releases the associated mutex.
*
* p_cond: pointer to the condition structure
* p_mutex: pointer to the mutex structure
* returnvalue: 0 = succeeded, 1 = failed
*/
int
NdbCondition_Wait
(
struct
NdbCondition
*
p_cond
,
NdbMutex
*
p_mutex
);
...
...
@@ -60,29 +60,29 @@ NdbCondition_WaitTimeout(struct NdbCondition* p_cond,
int
msec
);
/*
//
Signal a condition
//
//
* p_cond: pointer to the condition structure
//
* returnvalue: 0 = succeeded, 1 = failed
*/
/*
*
*
Signal a condition
*
* p_cond: pointer to the condition structure
* returnvalue: 0 = succeeded, 1 = failed
*/
int
NdbCondition_Signal
(
struct
NdbCondition
*
p_cond
);
/*
//
Broadcast a condition
//
//
* p_cond: pointer to the condition structure
//
* returnvalue: 0 = succeeded, 1 = failed
*/
/*
*
*
Broadcast a condition
*
* p_cond: pointer to the condition structure
* returnvalue: 0 = succeeded, 1 = failed
*/
int
NdbCondition_Broadcast
(
struct
NdbCondition
*
p_cond
);
/*
//
Destroy a condition
//
//
* p_cond: pointer to the condition structure
//
* returnvalue: 0 = succeeded, 1 = failed
*/
/*
*
*
Destroy a condition
*
* p_cond: pointer to the condition structure
* returnvalue: 0 = succeeded, 1 = failed
*/
int
NdbCondition_Destroy
(
struct
NdbCondition
*
p_cond
);
#ifdef __cplusplus
...
...
ndb/include/portlib/PortDefs.h
View file @
76b09dd5
...
...
@@ -28,35 +28,35 @@
struct
tms
{
time_t
tms_utime
;
// user time
time_t
tms_stime
;
// system time
time_t
tms_cutime
;
// user time of children
time_t
tms_cstime
;
// system time of children
time_t
tms_utime
;
/* user time */
time_t
tms_stime
;
/* system time */
time_t
tms_cutime
;
/* user time of children */
time_t
tms_cstime
;
/* system time of children */
};
struct
timespec
{
long
tv_sec
;
// Seconds
long
tv_nsec
;
// Nanoseconds
long
tv_sec
;
/* Seconds */
long
tv_nsec
;
/* Nanoseconds */
};
#define strcasecmp(a,b) _strcmpi(a,b)
// Exports a WIN32 getopt function
/* Exports a WIN32 getopt function */
extern
int
optind
;
extern
char
*
optarg
;
int
getopt
(
int
,
char
**
,
char
*
opts
);
#endif /
/ NDB_WIN32
#endif
/
* NDB_WIN32 */
#ifdef NDB_ALPHA
#ifdef NDB_GCC /
/ only for NDB_ALPHA
#ifdef NDB_GCC
/
* only for NDB_ALPHA */
extern
int
gnuShouldNotUseRPCC
();
#define RPCC() gnuShouldNotUseRPCC();
#else
#ifdef NDB_WIN32
#ifdef __cplusplus
extern
"C"
{
#endif /
/__cplusplus
#endif
/
* __cplusplus */
u_int64
__asm
(
char
*
,
...);
double
__dasm
(
char
*
,
...);
float
__fasm
(
char
*
,
...);
...
...
@@ -65,32 +65,32 @@ extern "C" {
int
__ADD_ATOMIC_LONG2
(
void
*
,
int
);
#ifdef __cplusplus
};
#endif /
/__cplusplus
#endif
/
* __cplusplus */
#pragma intrinsic (__asm, __dasm, __fasm)
#pragma intrinsic(_ReleaseSpinLock, _AcquireSpinLock)
#pragma intrinsic(__ADD_ATOMIC_LONG2)
#endif /
/ NDB_WIN32
#endif
/
* NDB_WIN32 */
#define RPCC() ((int)__asm(" rpcc v0;"))
#define MB() __asm(" mb;");
#define WMB() __asm(" wmb;");
#ifdef USE_INITIALSP
#define IS_IP() (__asm(" mov sp,v0;") < IPinitialSP)
#else /
/ USE_INITIALSP
#else
/
* USE_INITIALSP */
#define IS_IP() (((__asm(" rpcc v0;") >> 32) & 0x7) == IP_CPU)
#endif
#endif /
/NDB_GCC
#else /
/ NDB_ALPHA
#endif
/
* NDB_GCC */
#else
/
* NDB_ALPHA */
#if defined NDB_SPARC
#define MB() asm ("membar 0x0;"); /
/ LoadLoad
#define WMB() asm ("membar 0x3;"); /
/ StoreStore
#else /
/ NDB_SPARC
#define MB() asm ("membar 0x0;");
/
* LoadLoad */
#define WMB() asm ("membar 0x3;");
/
* StoreStore */
#else
/
* NDB_SPARC */
#define MB()
#define WMB()
#endif /
/ NDB_SPARC
#endif
/
* NDB_SPARC */
#define IS_IP() (1==1)
extern
int
shouldNotUseRPCC
();
#define RPCC() shouldNotUseRPCC();
#endif /
/ NDB_ALPHA
#endif
/
* NDB_ALPHA */
#endif
ndb/include/portlib/prefetch.h
View file @
76b09dd5
...
...
@@ -42,7 +42,7 @@ inline void prefetch(void* p)
{
#ifdef NDB_ALPHA
__asm
(
" ldl r31,0(a0);"
,
p
);
#endif /
/ NDB_ALPHA
#endif
/
* NDB_ALPHA */
#ifdef NDB_FORTE6
sparc_prefetch_read_once
(
p
);
#else
...
...
@@ -54,7 +54,7 @@ inline void writehint(void* p)
{
#ifdef NDB_ALPHA
__asm
(
" wh64 (a0);"
,
p
);
#endif /
/ NDB_ALPHA
#endif
/
* NDB_ALPHA */
#ifdef NDB_FORTE6
sparc_prefetch_write_once
(
p
);
#else
...
...
ndb/src/common/portlib/NdbDaemon.c
View file @
76b09dd5
...
...
@@ -28,7 +28,7 @@ NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags)
int
lockfd
=
-
1
,
logfd
=
-
1
,
n
;
char
buf
[
64
];
(
void
)
flags
;
/
/ remove warning for unused parameter
(
void
)
flags
;
/
* remove warning for unused parameter */
/* Check that we have write access to lock file */
assert
(
lockfile
!=
NULL
);
...
...
ndb/src/common/portlib/NdbMem.c
View file @
76b09dd5
...
...
@@ -42,7 +42,7 @@ void* NdbMem_Allocate(size_t size)
void
*
NdbMem_AllocateAlign
(
size_t
size
,
size_t
alignment
)
{
(
void
)
alignment
;
/
/ remove warning for unused parameter
(
void
)
alignment
;
/
* remove warning for unused parameter */
/*
return (void*)memalign(alignment, size);
TEMP fix
...
...
ndb/src/common/portlib/NdbThread.c
View file @
76b09dd5
...
...
@@ -42,7 +42,7 @@ struct NdbThread* NdbThread_Create(NDB_THREAD_FUNC *p_thread_func,
int
result
;
pthread_attr_t
thread_attr
;
(
void
)
thread_prio
;
/
/ remove warning for unused parameter
(
void
)
thread_prio
;
/
* remove warning for unused parameter */
if
(
p_thread_func
==
NULL
)
return
0
;
...
...
@@ -110,7 +110,7 @@ int NdbThread_SetConcurrencyLevel(int level)
#ifdef USE_PTHREAD_EXTRAS
return
pthread_setconcurrency
(
level
);
#else
(
void
)
level
;
/
/ remove warning for unused parameter
(
void
)
level
;
/
* remove warning for unused parameter */
return
0
;
#endif
}
ndb/src/common/portlib/memtest.c
View file @
76b09dd5
...
...
@@ -90,7 +90,7 @@ void malloctest(int loopcount, int memsize, int touch) {
long
long
start
=
0
;
int
total
=
0
;
int
i
=
0
,
j
=
0
;
int
size
=
memsize
*
1024
*
1024
;
/
/bytes
;
int
size
=
memsize
*
1024
*
1024
;
/
*bytes*/
;
float
mean
;
char
*
ptr
=
0
;
...
...
@@ -126,7 +126,7 @@ void mmaptest(int loopcount, int memsize, int touch) {
int
total
=
0
;
int
i
=
0
,
j
=
0
;
char
*
ptr
;
int
size
=
memsize
*
1024
*
1024
;
/
/bytes
;
int
size
=
memsize
*
1024
*
1024
;
/
*bytes*/
;
float
mean
;
printf
(
"Staring mmaptest "
);
...
...
@@ -165,7 +165,7 @@ void unmaptest(loopcount, memsize)
int
total
=
0
;
int
i
=
0
,
j
=
0
;
char
*
ptr
;
int
size
=
memsize
*
1024
*
1024
;
/
/bytes
;
int
size
=
memsize
*
1024
*
1024
;
/
*bytes*/
;
float
mean
;
printf
(
"Staring munmap test (loopcount = 1 no matter what you prev. set)
\n
"
);
...
...
@@ -215,7 +215,7 @@ void freetest(int loopcount, int memsize) {
long
long
start
=
0
;
int
total
=
0
;
int
i
=
0
,
j
=
0
;
int
size
=
memsize
*
1024
*
1024
;
/
/bytes
;
int
size
=
memsize
*
1024
*
1024
;
/
*bytes*/
;
float
mean
;
char
*
ptr
=
0
;
...
...
ndb/src/common/util/basestring_vsnprintf.c
View file @
76b09dd5
...
...
@@ -14,7 +14,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/
/ define on IRIX to get posix compliant vsnprintf
/
* define on IRIX to get posix compliant vsnprintf */
#define _XOPEN_SOURCE 500
#include <stdio.h>
#include <basestring_vsnprintf.h>
...
...
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