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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
5c20cae8
Commit
5c20cae8
authored
Jan 23, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge perch.ndb.mysql.com:/home/jonas/src/51-new
into perch.ndb.mysql.com:/home/jonas/src/51-ndb
parents
ef55f642
fef9b749
Changes
27
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
607 additions
and
409 deletions
+607
-409
config/ac-macros/ha_ndbcluster.m4
config/ac-macros/ha_ndbcluster.m4
+0
-10
storage/ndb/src/kernel/Makefile.am
storage/ndb/src/kernel/Makefile.am
+0
-15
storage/ndb/src/kernel/blocks/Makefile.am
storage/ndb/src/kernel/blocks/Makefile.am
+30
-12
storage/ndb/src/kernel/blocks/backup/Makefile.am
storage/ndb/src/kernel/blocks/backup/Makefile.am
+0
-17
storage/ndb/src/kernel/blocks/cmvmi/Makefile.am
storage/ndb/src/kernel/blocks/cmvmi/Makefile.am
+0
-24
storage/ndb/src/kernel/blocks/dbacc/Makefile.am
storage/ndb/src/kernel/blocks/dbacc/Makefile.am
+0
-26
storage/ndb/src/kernel/blocks/dbdict/Makefile.am
storage/ndb/src/kernel/blocks/dbdict/Makefile.am
+0
-16
storage/ndb/src/kernel/blocks/dbdih/Makefile.am
storage/ndb/src/kernel/blocks/dbdih/Makefile.am
+0
-20
storage/ndb/src/kernel/blocks/dblqh/Makefile.am
storage/ndb/src/kernel/blocks/dblqh/Makefile.am
+2
-17
storage/ndb/src/kernel/blocks/dbtc/Makefile.am
storage/ndb/src/kernel/blocks/dbtc/Makefile.am
+0
-23
storage/ndb/src/kernel/blocks/dbtup/Makefile.am
storage/ndb/src/kernel/blocks/dbtup/Makefile.am
+0
-37
storage/ndb/src/kernel/blocks/dbtux/Dbtux.hpp
storage/ndb/src/kernel/blocks/dbtux/Dbtux.hpp
+1
-1
storage/ndb/src/kernel/blocks/dbtux/Makefile.am
storage/ndb/src/kernel/blocks/dbtux/Makefile.am
+0
-36
storage/ndb/src/kernel/blocks/dbutil/Makefile.am
storage/ndb/src/kernel/blocks/dbutil/Makefile.am
+0
-23
storage/ndb/src/kernel/blocks/ndbcntr/Makefile.am
storage/ndb/src/kernel/blocks/ndbcntr/Makefile.am
+0
-26
storage/ndb/src/kernel/blocks/ndbfs/Makefile.am
storage/ndb/src/kernel/blocks/ndbfs/Makefile.am
+0
-27
storage/ndb/src/kernel/blocks/qmgr/Makefile.am
storage/ndb/src/kernel/blocks/qmgr/Makefile.am
+0
-25
storage/ndb/src/kernel/blocks/suma/Makefile.am
storage/ndb/src/kernel/blocks/suma/Makefile.am
+0
-23
storage/ndb/src/kernel/blocks/trix/Makefile.am
storage/ndb/src/kernel/blocks/trix/Makefile.am
+0
-23
storage/ndb/src/kernel/vm/Makefile.am
storage/ndb/src/kernel/vm/Makefile.am
+11
-2
storage/ndb/src/kernel/vm/NdbdSuperPool.cpp
storage/ndb/src/kernel/vm/NdbdSuperPool.cpp
+228
-0
storage/ndb/src/kernel/vm/NdbdSuperPool.hpp
storage/ndb/src/kernel/vm/NdbdSuperPool.hpp
+55
-0
storage/ndb/src/kernel/vm/SuperPool.cpp
storage/ndb/src/kernel/vm/SuperPool.cpp
+2
-2
storage/ndb/src/kernel/vm/SuperPool.hpp
storage/ndb/src/kernel/vm/SuperPool.hpp
+2
-1
storage/ndb/src/kernel/vm/bench_pool.cpp
storage/ndb/src/kernel/vm/bench_pool.cpp
+249
-0
storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp
storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp
+20
-1
storage/ndb/src/kernel/vm/ndbd_malloc_impl.hpp
storage/ndb/src/kernel/vm/ndbd_malloc_impl.hpp
+7
-2
No files found.
config/ac-macros/ha_ndbcluster.m4
View file @
5c20cae8
...
...
@@ -324,21 +324,11 @@ AC_DEFUN([MYSQL_SETUP_NDBCLUSTER], [
storage/ndb/src/kernel/Makefile dnl
storage/ndb/src/kernel/error/Makefile dnl
storage/ndb/src/kernel/blocks/Makefile dnl
storage/ndb/src/kernel/blocks/cmvmi/Makefile dnl
storage/ndb/src/kernel/blocks/dbacc/Makefile dnl
storage/ndb/src/kernel/blocks/dbdict/Makefile dnl
storage/ndb/src/kernel/blocks/dbdih/Makefile dnl
storage/ndb/src/kernel/blocks/dblqh/Makefile dnl
storage/ndb/src/kernel/blocks/dbtc/Makefile dnl
storage/ndb/src/kernel/blocks/dbtup/Makefile dnl
storage/ndb/src/kernel/blocks/ndbfs/Makefile dnl
storage/ndb/src/kernel/blocks/ndbcntr/Makefile dnl
storage/ndb/src/kernel/blocks/qmgr/Makefile dnl
storage/ndb/src/kernel/blocks/trix/Makefile dnl
storage/ndb/src/kernel/blocks/backup/Makefile dnl
storage/ndb/src/kernel/blocks/dbutil/Makefile dnl
storage/ndb/src/kernel/blocks/suma/Makefile dnl
storage/ndb/src/kernel/blocks/dbtux/Makefile dnl
storage/ndb/src/kernel/vm/Makefile dnl
storage/ndb/src/mgmapi/Makefile dnl
storage/ndb/src/ndbapi/Makefile dnl
...
...
storage/ndb/src/kernel/Makefile.am
View file @
5c20cae8
...
...
@@ -27,21 +27,6 @@ INCLUDES += \
-Iblocks
LDADD
+=
\
blocks/cmvmi/libcmvmi.a
\
blocks/dbacc/libdbacc.a
\
blocks/dbdict/libdbdict.a
\
blocks/dbdih/libdbdih.a
\
blocks/dblqh/libdblqh.a
\
blocks/dbtc/libdbtc.a
\
blocks/dbtup/libdbtup.a
\
blocks/ndbfs/libndbfs.a
\
blocks/ndbcntr/libndbcntr.a
\
blocks/qmgr/libqmgr.a
\
blocks/trix/libtrix.a
\
blocks/backup/libbackup.a
\
blocks/dbutil/libdbutil.a
\
blocks/suma/libsuma.a
\
blocks/dbtux/libdbtux.a
\
blocks/libblocks.a
\
vm/libkernel.a
\
error/liberror.a
\
...
...
storage/ndb/src/kernel/blocks/Makefile.am
View file @
5c20cae8
SUBDIRS
=
\
cmvmi
\
dbacc
\
dbdict
\
dbdih
\
dblqh
\
dbtc
\
dbtup
\
ndbfs
\
ndbcntr
\
qmgr
\
trix
\
backup
\
dbutil
\
suma
\
dbtux
backup
noinst_LIBRARIES
=
libblocks.a
INCLUDES_LOC
=
-I
$(top_srcdir)
/storage/ndb/src/kernel/blocks/dblqh
libblocks_a_SOURCES
=
tsman.cpp lgman.cpp pgman.cpp diskpage.cpp restore.cpp
libblocks_a_SOURCES
=
tsman.cpp lgman.cpp pgman.cpp diskpage.cpp restore.cpp
\
cmvmi/Cmvmi.cpp
\
dbacc/DbaccInit.cpp dbacc/DbaccMain.cpp
\
dbdict/Dbdict.cpp
\
dbdih/DbdihInit.cpp dbdih/DbdihMain.cpp
\
dblqh/DblqhInit.cpp dblqh/DblqhMain.cpp
\
dbtc/DbtcInit.cpp dbtc/DbtcMain.cpp
\
dbtup/DbtupExecQuery.cpp dbtup/DbtupBuffer.cpp
\
dbtup/DbtupRoutines.cpp dbtup/DbtupCommit.cpp
\
dbtup/DbtupFixAlloc.cpp dbtup/DbtupTrigger.cpp
\
dbtup/DbtupAbort.cpp dbtup/DbtupPageMap.cpp
\
dbtup/DbtupPagMan.cpp dbtup/DbtupStoredProcDef.cpp
\
dbtup/DbtupMeta.cpp dbtup/DbtupTabDesMan.cpp
\
dbtup/DbtupGen.cpp dbtup/DbtupIndex.cpp
\
dbtup/DbtupDebug.cpp dbtup/DbtupScan.cpp
\
dbtup/DbtupDiskAlloc.cpp dbtup/DbtupVarAlloc.cpp
\
dbtup/tuppage.cpp dbtup/Undo_buffer.cpp
\
ndbfs/AsyncFile.cpp ndbfs/Ndbfs.cpp ndbfs/VoidFs.cpp
\
ndbfs/Filename.cpp ndbfs/CircularIndex.cpp
\
ndbcntr/NdbcntrInit.cpp ndbcntr/NdbcntrSysTable.cpp ndbcntr/NdbcntrMain.cpp
\
qmgr/QmgrInit.cpp qmgr/QmgrMain.cpp
\
trix/Trix.cpp
\
backup/Backup.cpp backup/BackupInit.cpp
\
dbutil/DbUtil.cpp
\
suma/Suma.cpp suma/SumaInit.cpp
\
dbtux/DbtuxGen.cpp dbtux/DbtuxMeta.cpp dbtux/DbtuxMaint.cpp
\
dbtux/DbtuxNode.cpp dbtux/DbtuxTree.cpp dbtux/DbtuxScan.cpp
\
dbtux/DbtuxSearch.cpp dbtux/DbtuxCmp.cpp dbtux/DbtuxStat.cpp
\
dbtux/DbtuxDebug.cpp
ndbtools_PROGRAMS
=
ndb_print_file
ndb_print_file_SOURCES
=
print_file.cpp diskpage.cpp dbtup/tuppage.cpp
...
...
storage/ndb/src/kernel/blocks/backup/Makefile.am
View file @
5c20cae8
noinst_LIBRARIES
=
libbackup.a
libbackup_a_SOURCES
=
Backup.cpp BackupInit.cpp
ndbtools_PROGRAMS
=
ndb_print_backup_file
ndb_print_backup_file_SOURCES
=
read.cpp
ndb_print_backup_file_LDFLAGS
=
@ndb_bin_am_ldflags@
\
...
...
@@ -17,16 +13,3 @@ include $(top_srcdir)/storage/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%
::
SCCS/s.%
windoze-dsp
:
libbackup.dsp
libbackup.dsp
:
Makefile
\
$(top_srcdir)/storage/ndb/config/win-lib.am
\
$(top_srcdir)/storage/ndb/config/win-name
\
$(top_srcdir)/storage/ndb/config/win-includes
\
$(top_srcdir)/storage/ndb/config/win-sources
\
$(top_srcdir)/storage/ndb/config/win-libraries
cat
$(top_srcdir)
/storage/ndb/config/win-lib.am
>
$@
@
$(top_srcdir)
/storage/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/storage/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/storage/ndb/config/win-sources
$@
$(libbackup_a_SOURCES)
@
$(top_srcdir)
/storage/ndb/config/win-libraries
$@
LIB
$(LDADD)
storage/ndb/src/kernel/blocks/cmvmi/Makefile.am
deleted
100644 → 0
View file @
ef55f642
noinst_LIBRARIES
=
libcmvmi.a
libcmvmi_a_SOURCES
=
Cmvmi.cpp
include
$(top_srcdir)/storage/ndb/config/common.mk.am
include
$(top_srcdir)/storage/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%
::
SCCS/s.%
windoze-dsp
:
libcmvmi.dsp
libcmvmi.dsp
:
Makefile
\
$(top_srcdir)/storage/ndb/config/win-lib.am
\
$(top_srcdir)/storage/ndb/config/win-name
\
$(top_srcdir)/storage/ndb/config/win-includes
\
$(top_srcdir)/storage/ndb/config/win-sources
\
$(top_srcdir)/storage/ndb/config/win-libraries
cat
$(top_srcdir)
/storage/ndb/config/win-lib.am
>
$@
@
$(top_srcdir)
/storage/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/storage/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/storage/ndb/config/win-sources
$@
$(libcmvmi_a_SOURCES)
@
$(top_srcdir)
/storage/ndb/config/win-libraries
$@
LIB
$(LDADD)
storage/ndb/src/kernel/blocks/dbacc/Makefile.am
deleted
100644 → 0
View file @
ef55f642
noinst_LIBRARIES
=
libdbacc.a
libdbacc_a_SOURCES
=
DbaccInit.cpp DbaccMain.cpp
INCLUDES_LOC
=
-I
$(top_srcdir)
/storage/ndb/src/kernel/blocks/dbtup
include
$(top_srcdir)/storage/ndb/config/common.mk.am
include
$(top_srcdir)/storage/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%
::
SCCS/s.%
windoze-dsp
:
libdbacc.dsp
libdbacc.dsp
:
Makefile
\
$(top_srcdir)/storage/ndb/config/win-lib.am
\
$(top_srcdir)/storage/ndb/config/win-name
\
$(top_srcdir)/storage/ndb/config/win-includes
\
$(top_srcdir)/storage/ndb/config/win-sources
\
$(top_srcdir)/storage/ndb/config/win-libraries
cat
$(top_srcdir)
/storage/ndb/config/win-lib.am
>
$@
@
$(top_srcdir)
/storage/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/storage/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/storage/ndb/config/win-sources
$@
$(libdbacc_a_SOURCES)
@
$(top_srcdir)
/storage/ndb/config/win-libraries
$@
LIB
$(LDADD)
storage/ndb/src/kernel/blocks/dbdict/Makefile.am
View file @
5c20cae8
noinst_LIBRARIES
=
libdbdict.a
libdbdict_a_SOURCES
=
Dbdict.cpp
include
$(top_srcdir)/storage/ndb/config/common.mk.am
include
$(top_srcdir)/storage/ndb/config/type_kernel.mk.am
...
...
@@ -23,16 +20,3 @@ ndb_print_schema_file_LDFLAGS = @ndb_bin_am_ldflags@ \
# Don't update the files from bitkeeper
%
::
SCCS/s.%
windoze-dsp
:
libdbdict.dsp
libdbdict.dsp
:
Makefile
\
$(top_srcdir)/storage/ndb/config/win-lib.am
\
$(top_srcdir)/storage/ndb/config/win-name
\
$(top_srcdir)/storage/ndb/config/win-includes
\
$(top_srcdir)/storage/ndb/config/win-sources
\
$(top_srcdir)/storage/ndb/config/win-libraries
cat
$(top_srcdir)
/storage/ndb/config/win-lib.am
>
$@
@
$(top_srcdir)
/storage/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/storage/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/storage/ndb/config/win-sources
$@
$(libdbdict_a_SOURCES)
@
$(top_srcdir)
/storage/ndb/config/win-libraries
$@
LIB
$(LDADD)
storage/ndb/src/kernel/blocks/dbdih/Makefile.am
View file @
5c20cae8
noinst_LIBRARIES
=
libdbdih.a
libdbdih_a_SOURCES
=
DbdihInit.cpp DbdihMain.cpp
ndbtools_PROGRAMS
=
ndb_print_sys_file
ndb_print_sys_file_SOURCES
=
printSysfile.cpp
ndb_print_sys_file_LDFLAGS
=
@ndb_bin_am_ldflags@
\
...
...
@@ -15,19 +11,3 @@ ndb_print_sys_file_LDFLAGS = @ndb_bin_am_ldflags@ \
include
$(top_srcdir)/storage/ndb/config/common.mk.am
include
$(top_srcdir)/storage/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%
::
SCCS/s.%
windoze-dsp
:
libdbdih.dsp
libdbdih.dsp
:
Makefile
\
$(top_srcdir)/storage/ndb/config/win-lib.am
\
$(top_srcdir)/storage/ndb/config/win-name
\
$(top_srcdir)/storage/ndb/config/win-includes
\
$(top_srcdir)/storage/ndb/config/win-sources
\
$(top_srcdir)/storage/ndb/config/win-libraries
cat
$(top_srcdir)
/storage/ndb/config/win-lib.am
>
$@
@
$(top_srcdir)
/storage/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/storage/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/storage/ndb/config/win-sources
$@
$(libdbdih_a_SOURCES)
@
$(top_srcdir)
/storage/ndb/config/win-libraries
$@
LIB
$(LDADD)
storage/ndb/src/kernel/blocks/dblqh/Makefile.am
View file @
5c20cae8
noinst_LIBRARIES
=
libdblqh.a
EXTRA_PROGRAMS
=
ndbd_redo_log_reader
libdblqh_a_SOURCES
=
DblqhInit.cpp DblqhMain.cpp
ndbd_redo_log_reader_SOURCES
=
redoLogReader/records.cpp
redoLogReader/redoLogFileReader.cpp
ndbd_redo_log_reader_SOURCES
=
redoLogReader/records.cpp
\
redoLogReader/redoLogFileReader.cpp
include
$(top_srcdir)/storage/ndb/config/common.mk.am
include
$(top_srcdir)/storage/ndb/config/type_kernel.mk.am
...
...
@@ -13,17 +12,3 @@ LDADD += \
# Don't update the files from bitkeeper
%
::
SCCS/s.%
windoze-dsp
:
libdblqh.dsp
libdblqh.dsp
:
Makefile
\
$(top_srcdir)/storage/ndb/config/win-lib.am
\
$(top_srcdir)/storage/ndb/config/win-name
\
$(top_srcdir)/storage/ndb/config/win-includes
\
$(top_srcdir)/storage/ndb/config/win-sources
\
$(top_srcdir)/storage/ndb/config/win-libraries
cat
$(top_srcdir)
/storage/ndb/config/win-lib.am
>
$@
@
$(top_srcdir)
/storage/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/storage/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/storage/ndb/config/win-sources
$@
$(libdblqh_a_SOURCES)
@
$(top_srcdir)
/storage/ndb/config/win-libraries
$@
LIB
$(LDADD)
storage/ndb/src/kernel/blocks/dbtc/Makefile.am
deleted
100644 → 0
View file @
ef55f642
noinst_LIBRARIES
=
libdbtc.a
libdbtc_a_SOURCES
=
DbtcInit.cpp DbtcMain.cpp
include
$(top_srcdir)/storage/ndb/config/common.mk.am
include
$(top_srcdir)/storage/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%
::
SCCS/s.%
windoze-dsp
:
libdbtc.dsp
libdbtc.dsp
:
Makefile
\
$(top_srcdir)/storage/ndb/config/win-lib.am
\
$(top_srcdir)/storage/ndb/config/win-name
\
$(top_srcdir)/storage/ndb/config/win-includes
\
$(top_srcdir)/storage/ndb/config/win-sources
\
$(top_srcdir)/storage/ndb/config/win-libraries
cat
$(top_srcdir)
/storage/ndb/config/win-lib.am
>
$@
@
$(top_srcdir)
/storage/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/storage/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/storage/ndb/config/win-sources
$@
$(libdbtc_a_SOURCES)
@
$(top_srcdir)
/storage/ndb/config/win-libraries
$@
LIB
$(LDADD)
storage/ndb/src/kernel/blocks/dbtup/Makefile.am
View file @
5c20cae8
noinst_LIBRARIES
=
libdbtup.a
libdbtup_a_SOURCES
=
\
DbtupExecQuery.cpp
\
DbtupBuffer.cpp
\
DbtupRoutines.cpp
\
DbtupCommit.cpp
\
DbtupFixAlloc.cpp
\
DbtupTrigger.cpp
\
DbtupAbort.cpp
\
DbtupPageMap.cpp
\
DbtupPagMan.cpp
\
DbtupStoredProcDef.cpp
\
DbtupMeta.cpp
\
DbtupTabDesMan.cpp
\
DbtupGen.cpp
\
DbtupIndex.cpp
\
DbtupDebug.cpp
\
DbtupScan.cpp
\
DbtupDiskAlloc.cpp DbtupVarAlloc.cpp
\
tuppage.cpp Undo_buffer.cpp
INCLUDES_LOC
=
-I
$(top_srcdir)
/storage/ndb/src/kernel/blocks/dblqh
include
$(top_srcdir)/storage/ndb/config/common.mk.am
include
$(top_srcdir)/storage/ndb/config/type_kernel.mk.am
...
...
@@ -28,20 +5,6 @@ include $(top_srcdir)/storage/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%
::
SCCS/s.%
windoze-dsp
:
libdbtup.dsp
libdbtup.dsp
:
Makefile
\
$(top_srcdir)/storage/ndb/config/win-lib.am
\
$(top_srcdir)/storage/ndb/config/win-name
\
$(top_srcdir)/storage/ndb/config/win-includes
\
$(top_srcdir)/storage/ndb/config/win-sources
\
$(top_srcdir)/storage/ndb/config/win-libraries
cat
$(top_srcdir)
/storage/ndb/config/win-lib.am
>
$@
@
$(top_srcdir)
/storage/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/storage/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/storage/ndb/config/win-sources
$@
$(libdbtup_a_SOURCES)
@
$(top_srcdir)
/storage/ndb/config/win-libraries
$@
LIB
$(LDADD)
ndbtest_PROGRAMS
=
test_varpage
test_varpage_SOURCES
=
test_varpage.cpp tuppage.cpp
test_varpage_LDFLAGS
=
@ndb_bin_am_ldflags@
\
...
...
storage/ndb/src/kernel/blocks/dbtux/Dbtux.hpp
View file @
5c20cae8
...
...
@@ -26,7 +26,7 @@
#include <md5_hash.hpp>
// big brother
#include <Dbtup.hpp>
#include <
dbtup/
Dbtup.hpp>
// signal classes
#include <signaldata/DictTabInfo.hpp>
...
...
storage/ndb/src/kernel/blocks/dbtux/Makefile.am
deleted
100644 → 0
View file @
ef55f642
noinst_LIBRARIES
=
libdbtux.a
libdbtux_a_SOURCES
=
\
DbtuxGen.cpp
\
DbtuxMeta.cpp
\
DbtuxMaint.cpp
\
DbtuxNode.cpp
\
DbtuxTree.cpp
\
DbtuxScan.cpp
\
DbtuxSearch.cpp
\
DbtuxCmp.cpp
\
DbtuxStat.cpp
\
DbtuxDebug.cpp
INCLUDES_LOC
=
-I
$(top_srcdir)
/storage/ndb/src/kernel/blocks/dbtup
\
-I
$(top_srcdir)
/storage/ndb/src/kernel/blocks/dblqh
include
$(top_srcdir)/storage/ndb/config/common.mk.am
include
$(top_srcdir)/storage/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%
::
SCCS/s.%
windoze-dsp
:
libdbtux.dsp
libdbtux.dsp
:
Makefile
\
$(top_srcdir)/storage/ndb/config/win-lib.am
\
$(top_srcdir)/storage/ndb/config/win-name
\
$(top_srcdir)/storage/ndb/config/win-includes
\
$(top_srcdir)/storage/ndb/config/win-sources
\
$(top_srcdir)/storage/ndb/config/win-libraries
cat
$(top_srcdir)
/storage/ndb/config/win-lib.am
>
$@
@
$(top_srcdir)
/storage/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/storage/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/storage/ndb/config/win-sources
$@
$(libdbtux_a_SOURCES)
@
$(top_srcdir)
/storage/ndb/config/win-libraries
$@
LIB
$(LDADD)
storage/ndb/src/kernel/blocks/dbutil/Makefile.am
deleted
100644 → 0
View file @
ef55f642
noinst_LIBRARIES
=
libdbutil.a
libdbutil_a_SOURCES
=
DbUtil.cpp
include
$(top_srcdir)/storage/ndb/config/common.mk.am
include
$(top_srcdir)/storage/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%
::
SCCS/s.%
windoze-dsp
:
libdbutil.dsp
libdbutil.dsp
:
Makefile
\
$(top_srcdir)/storage/ndb/config/win-lib.am
\
$(top_srcdir)/storage/ndb/config/win-name
\
$(top_srcdir)/storage/ndb/config/win-includes
\
$(top_srcdir)/storage/ndb/config/win-sources
\
$(top_srcdir)/storage/ndb/config/win-libraries
cat
$(top_srcdir)
/storage/ndb/config/win-lib.am
>
$@
@
$(top_srcdir)
/storage/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/storage/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/storage/ndb/config/win-sources
$@
$(libdbutil_a_SOURCES)
@
$(top_srcdir)
/storage/ndb/config/win-libraries
$@
LIB
$(LDADD)
storage/ndb/src/kernel/blocks/ndbcntr/Makefile.am
deleted
100644 → 0
View file @
ef55f642
noinst_LIBRARIES
=
libndbcntr.a
libndbcntr_a_SOURCES
=
\
NdbcntrInit.cpp
\
NdbcntrSysTable.cpp
\
NdbcntrMain.cpp
include
$(top_srcdir)/storage/ndb/config/common.mk.am
include
$(top_srcdir)/storage/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%
::
SCCS/s.%
windoze-dsp
:
libndbcntr.dsp
libndbcntr.dsp
:
Makefile
\
$(top_srcdir)/storage/ndb/config/win-lib.am
\
$(top_srcdir)/storage/ndb/config/win-name
\
$(top_srcdir)/storage/ndb/config/win-includes
\
$(top_srcdir)/storage/ndb/config/win-sources
\
$(top_srcdir)/storage/ndb/config/win-libraries
cat
$(top_srcdir)
/storage/ndb/config/win-lib.am
>
$@
@
$(top_srcdir)
/storage/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/storage/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/storage/ndb/config/win-sources
$@
$
(
libstorage/ndbcntr_a_SOURCES
)
@
$(top_srcdir)
/storage/ndb/config/win-libraries
$@
LIB
$(LDADD)
storage/ndb/src/kernel/blocks/ndbfs/Makefile.am
deleted
100644 → 0
View file @
ef55f642
noinst_LIBRARIES
=
libndbfs.a
libndbfs_a_SOURCES
=
\
AsyncFile.cpp
\
Ndbfs.cpp VoidFs.cpp
\
Filename.cpp
\
CircularIndex.cpp
include
$(top_srcdir)/storage/ndb/config/common.mk.am
include
$(top_srcdir)/storage/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%
::
SCCS/s.%
windoze-dsp
:
libndbfs.dsp
libndbfs.dsp
:
Makefile
\
$(top_srcdir)/storage/ndb/config/win-lib.am
\
$(top_srcdir)/storage/ndb/config/win-name
\
$(top_srcdir)/storage/ndb/config/win-includes
\
$(top_srcdir)/storage/ndb/config/win-sources
\
$(top_srcdir)/storage/ndb/config/win-libraries
cat
$(top_srcdir)
/storage/ndb/config/win-lib.am
>
$@
@
$(top_srcdir)
/storage/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/storage/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/storage/ndb/config/win-sources
$@
$
(
libstorage/ndbfs_a_SOURCES
)
@
$(top_srcdir)
/storage/ndb/config/win-libraries
$@
LIB
$(LDADD)
storage/ndb/src/kernel/blocks/qmgr/Makefile.am
deleted
100644 → 0
View file @
ef55f642
noinst_LIBRARIES
=
libqmgr.a
libqmgr_a_SOURCES
=
\
QmgrInit.cpp
\
QmgrMain.cpp
include
$(top_srcdir)/storage/ndb/config/common.mk.am
include
$(top_srcdir)/storage/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%
::
SCCS/s.%
windoze-dsp
:
libqmgr.dsp
libqmgr.dsp
:
Makefile
\
$(top_srcdir)/storage/ndb/config/win-lib.am
\
$(top_srcdir)/storage/ndb/config/win-name
\
$(top_srcdir)/storage/ndb/config/win-includes
\
$(top_srcdir)/storage/ndb/config/win-sources
\
$(top_srcdir)/storage/ndb/config/win-libraries
cat
$(top_srcdir)
/storage/ndb/config/win-lib.am
>
$@
@
$(top_srcdir)
/storage/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/storage/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/storage/ndb/config/win-sources
$@
$(libqmgr_a_SOURCES)
@
$(top_srcdir)
/storage/ndb/config/win-libraries
$@
LIB
$(LDADD)
storage/ndb/src/kernel/blocks/suma/Makefile.am
deleted
100644 → 0
View file @
ef55f642
noinst_LIBRARIES
=
libsuma.a
libsuma_a_SOURCES
=
Suma.cpp SumaInit.cpp
include
$(top_srcdir)/storage/ndb/config/common.mk.am
include
$(top_srcdir)/storage/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%
::
SCCS/s.%
windoze-dsp
:
libsuma.dsp
libsuma.dsp
:
Makefile
\
$(top_srcdir)/storage/ndb/config/win-lib.am
\
$(top_srcdir)/storage/ndb/config/win-name
\
$(top_srcdir)/storage/ndb/config/win-includes
\
$(top_srcdir)/storage/ndb/config/win-sources
\
$(top_srcdir)/storage/ndb/config/win-libraries
cat
$(top_srcdir)
/storage/ndb/config/win-lib.am
>
$@
@
$(top_srcdir)
/storage/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/storage/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/storage/ndb/config/win-sources
$@
$(libsuma_a_SOURCES)
@
$(top_srcdir)
/storage/ndb/config/win-libraries
$@
LIB
$(LDADD)
storage/ndb/src/kernel/blocks/trix/Makefile.am
deleted
100644 → 0
View file @
ef55f642
noinst_LIBRARIES
=
libtrix.a
libtrix_a_SOURCES
=
Trix.cpp
include
$(top_srcdir)/storage/ndb/config/common.mk.am
include
$(top_srcdir)/storage/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%
::
SCCS/s.%
windoze-dsp
:
libtrix.dsp
libtrix.dsp
:
Makefile
\
$(top_srcdir)/storage/ndb/config/win-lib.am
\
$(top_srcdir)/storage/ndb/config/win-name
\
$(top_srcdir)/storage/ndb/config/win-includes
\
$(top_srcdir)/storage/ndb/config/win-sources
\
$(top_srcdir)/storage/ndb/config/win-libraries
cat
$(top_srcdir)
/storage/ndb/config/win-lib.am
>
$@
@
$(top_srcdir)
/storage/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/storage/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/storage/ndb/config/win-sources
$@
$(libtrix_a_SOURCES)
@
$(top_srcdir)
/storage/ndb/config/win-libraries
$@
LIB
$(LDADD)
storage/ndb/src/kernel/vm/Makefile.am
View file @
5c20cae8
...
...
@@ -20,7 +20,8 @@ libkernel_a_SOURCES = \
Mutex.cpp SafeCounter.cpp
\
Rope.cpp
\
SuperPool.cpp
\
ndbd_malloc.cpp ndbd_malloc_impl.cpp
ndbd_malloc.cpp ndbd_malloc_impl.cpp
\
NdbdSuperPool.cpp
INCLUDES_LOC
=
-I
$(top_srcdir)
/storage/ndb/src/mgmapi
...
...
@@ -44,7 +45,7 @@ libkernel.dsp: Makefile \
@
$(top_srcdir)
/storage/ndb/config/win-sources
$@
$(libkernel_a_SOURCES)
@
$(top_srcdir)
/storage/ndb/config/win-libraries
$@
LIB
$(LDADD)
EXTRA_PROGRAMS
=
ndbd_malloc_impl_test
EXTRA_PROGRAMS
=
ndbd_malloc_impl_test
bench_pool
ndbd_malloc_impl_test_CXXFLAGS
=
-DUNIT_TEST
ndbd_malloc_impl_test_SOURCES
=
ndbd_malloc_impl.cpp
ndbd_malloc_impl_test_LDFLAGS
=
@ndb_bin_am_ldflags@
\
...
...
@@ -52,3 +53,11 @@ ndbd_malloc_impl_test_LDFLAGS = @ndb_bin_am_ldflags@ \
$(top_builddir)
/mysys/libmysys.a
\
$(top_builddir)
/dbug/libdbug.a
\
$(top_builddir)
/strings/libmystrings.a
bench_pool_SOURCES
=
bench_pool.cpp ndbd_malloc.cpp
\
SuperPool.cpp NdbdSuperPool.cpp ndbd_malloc_impl.cpp
bench_pool_LDFLAGS
=
@ndb_bin_am_ldflags@
\
$(top_builddir)
/storage/ndb/src/libndbclient.la
\
$(top_builddir)
/mysys/libmysys.a
\
$(top_builddir)
/dbug/libdbug.a
\
$(top_builddir)
/strings/libmystrings.a
storage/ndb/src/kernel/vm/NdbdSuperPool.cpp
0 → 100644
View file @
5c20cae8
/* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <ndb_global.h>
#include "SuperPool.hpp"
#include "ndbd_malloc_impl.hpp"
#include "NdbdSuperPool.hpp"
#define PSI (1 << (BMW_2LOG + 2))
struct
AllocArea
{
AllocArea
(
AllocArea
*
next
);
Uint16
m_currPage
;
// 2
Uint16
m_numPages
;
// number of pages // 2
SuperPool
::
PtrI
m_firstPageI
;
// 4
void
*
m_memory
;
// page-aligned pages // 4/8
struct
AllocArea
*
m_nextArea
;
// 4/8
// tot 16/24
};
AllocArea
::
AllocArea
(
AllocArea
*
next
)
{
m_nextArea
=
next
;
m_firstPageI
=
RNIL
;
m_currPage
=
m_numPages
=
0
;
m_memory
=
0
;
}
NdbdSuperPool
::
NdbdSuperPool
(
class
Ndbd_mem_manager
&
mm
,
Uint32
pageSize
,
Uint32
pageBits
)
:
SuperPool
(
pageSize
,
pageBits
),
m_mm
(
mm
),
m_currArea
(
0
),
m_firstArea
(
0
)
{
m_memRoot
=
m_mm
.
get_memroot
();
m_shift
=
Ndbd_mem_manager
::
log2
((
1
<<
(
BMW_2LOG
+
2
))
/
pageSize
)
-
1
;
m_add
=
(
1
<<
m_shift
)
-
1
;
}
NdbdSuperPool
::~
NdbdSuperPool
()
{
Uint32
cnt
=
PSI
/
sizeof
(
AllocArea
);
AllocArea
*
ap
=
m_firstArea
;
while
(
ap
!=
0
)
{
AllocArea
*
first
=
ap
;
for
(
Uint32
i
=
0
;
i
<
cnt
;
i
++
)
{
if
(
ap
->
m_numPages
)
{
m_mm
.
release
(
ap
->
m_memory
,
ap
->
m_numPages
>>
m_shift
);
}
ap
=
ap
->
m_nextArea
;
}
m_mm
.
release
((
void
*
)
first
,
1
);
}
}
bool
NdbdSuperPool
::
init_1
()
{
Uint32
pageCount
=
(
1
<<
m_pageBits
);
if
(
m_pageEnt
==
0
)
{
// allocate page entry array
Uint32
bytes
=
pageCount
*
sizeof
(
PageEnt
);
m_pageEnt
=
static_cast
<
PageEnt
*>
(
malloc
(
bytes
));
if
(
m_pageEnt
==
0
)
return
false
;
for
(
Uint32
i
=
0
;
i
<
pageCount
;
i
++
)
new
(
&
m_pageEnt
[
i
])
PageEnt
();
}
if
(
m_pageType
==
0
)
{
// allocate type check array
Uint32
bytes
=
pageCount
;
m_pageType
=
static_cast
<
Uint8
*>
(
malloc
(
bytes
));
if
(
m_pageType
==
0
)
return
false
;
memset
(
m_pageType
,
0
,
bytes
);
}
return
true
;
}
static
void
initAllocAreaPage
(
AllocArea
*
p1
)
{
AllocArea
*
ap
=
p1
;
Uint32
cnt
=
PSI
/
sizeof
(
AllocArea
);
for
(
Uint32
i
=
0
;
i
<
cnt
;
i
++
,
ap
++
)
{
new
(
ap
)
AllocArea
(
ap
+
1
);
}
(
p1
+
cnt
-
1
)
->
m_nextArea
=
0
;
}
bool
NdbdSuperPool
::
init_2
()
{
m_memRoot
=
m_mm
.
get_memroot
();
Uint32
cnt
=
1
;
AllocArea
*
p1
=
(
AllocArea
*
)
m_mm
.
alloc
(
&
cnt
,
1
);
if
(
p1
==
0
)
return
false
;
initAllocAreaPage
(
p1
);
m_currArea
=
p1
;
m_firstArea
=
p1
;
return
true
;
}
SuperPool
::
PtrI
NdbdSuperPool
::
getNewPage
()
{
AllocArea
*
ap
=
m_currArea
;
Uint32
curr
=
ap
->
m_currPage
;
Uint32
cnt
=
ap
->
m_numPages
;
if
(
curr
==
cnt
)
{
// area is used up
if
(
!
(
ap
=
allocMem
()))
{
abort
();
return
RNIL
;
}
curr
=
ap
->
m_currPage
;
cnt
=
ap
->
m_numPages
;
}
assert
(
curr
<
cnt
);
PtrI
pageI
=
ap
->
m_firstPageI
;
Uint32
recBits
=
m_recBits
;
Int32
ip
=
((
Int32
)
pageI
>>
recBits
)
+
curr
;
pageI
=
ip
<<
recBits
;
ap
->
m_currPage
=
curr
+
1
;
return
pageI
;
}
Uint32
NdbdSuperPool
::
allocAreaMemory
(
AllocArea
*
ap
,
Uint32
tryPages
)
{
Uint32
cnt
=
(
tryPages
+
m_add
)
>>
m_shift
;
void
*
p1
=
m_mm
.
alloc
(
&
cnt
,
1
);
if
(
p1
==
0
)
{
abort
();
return
0
;
}
Uint32
pageI
=
getPageI
(
p1
);
ap
->
m_firstPageI
=
pageI
;
ap
->
m_currPage
=
0
;
ap
->
m_memory
=
p1
;
ap
->
m_numPages
=
cnt
<<
m_shift
;
return
cnt
;
}
AllocArea
*
NdbdSuperPool
::
allocArea
()
{
AllocArea
*
curr
=
m_currArea
;
AllocArea
*
next
=
curr
->
m_nextArea
;
if
(
next
==
0
)
{
Uint32
cnt
=
1
;
AllocArea
*
p1
=
(
AllocArea
*
)
m_mm
.
alloc
(
&
cnt
,
1
);
if
(
p1
==
0
)
return
0
;
initAllocAreaPage
(
p1
);
m_currArea
->
m_nextArea
=
p1
;
return
m_currArea
=
p1
;
}
else
{
m_currArea
=
m_currArea
->
m_nextArea
;
return
m_currArea
;
}
}
AllocArea
*
NdbdSuperPool
::
allocMem
()
{
// compute number of additional pages needed
if
(
m_totPages
>=
m_maxPages
)
{
abort
();
return
0
;
}
Uint32
needPages
=
(
m_totPages
==
0
?
m_initPages
:
m_incrPages
);
// add new area
AllocArea
*
ap
=
allocArea
();
if
(
ap
==
0
)
{
abort
();
return
0
;
}
Uint32
numPages
;
if
(
!
(
numPages
=
allocAreaMemory
(
ap
,
needPages
)))
{
abort
();
return
0
;
}
// update counts
m_totPages
+=
numPages
;
return
ap
;
}
storage/ndb/src/kernel/vm/NdbdSuperPool.hpp
0 → 100644
View file @
5c20cae8
/* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#ifndef NDBD_SUPER_POOL_HPP
#define NDBD_SUPER_POOL_HPP
#include "SuperPool.hpp"
struct
AllocArea
;
class
NdbdSuperPool
:
public
SuperPool
{
public:
NdbdSuperPool
(
class
Ndbd_mem_manager
&
,
Uint32
pageSize
,
Uint32
pageBits
);
// Destructor.
virtual
~
NdbdSuperPool
();
// Get new page from current area.
virtual
PtrI
getNewPage
();
// Call first...on all superpools (uses malloc)
bool
init_1
();
// Call second...uses mm
bool
init_2
();
virtual
bool
allocMemory
()
{
return
allocMem
()
!=
0
;
}
private:
Uint32
allocAreaMemory
(
AllocArea
*
,
Uint32
pages
);
AllocArea
*
allocArea
();
AllocArea
*
allocMem
();
// List of malloc areas.
Uint32
m_shift
,
m_add
;
class
Ndbd_mem_manager
&
m_mm
;
AllocArea
*
m_currArea
;
AllocArea
*
m_firstArea
;
};
#endif
storage/ndb/src/kernel/vm/SuperPool.cpp
View file @
5c20cae8
...
...
@@ -644,7 +644,7 @@ HeapPool::getNewPage()
if
(
ap
->
m_currPage
==
ap
->
m_numPages
)
{
// area is used up
if
(
ap
->
m_nextArea
==
0
)
{
if
(
!
allocMemory
())
if
(
!
allocMemory
Impl
())
return
RNIL
;
}
ap
=
m_currArea
=
ap
->
m_nextArea
;
...
...
@@ -711,7 +711,7 @@ HeapPool::allocArea(Area* ap, Uint32 tryPages)
}
bool
HeapPool
::
allocMemory
()
HeapPool
::
allocMemory
Impl
()
{
if
(
!
allocInit
())
return
false
;
...
...
storage/ndb/src/kernel/vm/SuperPool.hpp
View file @
5c20cae8
...
...
@@ -580,7 +580,8 @@ public:
bool
allocArea
(
Area
*
ap
,
Uint32
tryPages
);
// Allocate memory.
virtual
bool
allocMemory
();
virtual
bool
allocMemory
()
{
return
allocMemoryImpl
();}
bool
allocMemoryImpl
();
// List of malloc areas.
Area
m_areaHead
;
...
...
storage/ndb/src/kernel/vm/bench_pool.cpp
0 → 100644
View file @
5c20cae8
/* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include "NdbdSuperPool.hpp"
#include "ArrayPool.hpp"
#include <NdbTick.h>
#include "ndbd_malloc_impl.hpp"
template
<
typename
T
>
inline
void
init
(
ArrayPool
<
T
>
&
pool
,
Uint32
cnt
)
{
pool
.
setSize
(
cnt
+
1
);
}
template
<
typename
T
>
inline
void
init
(
RecordPool
<
T
>
&
pool
,
Uint32
cnt
)
{
}
template
<
typename
T
,
typename
R
>
inline
void
test_pool
(
R
&
pool
,
Uint32
cnt
,
Uint32
loops
)
{
init
(
pool
,
cnt
);
Ptr
<
T
>
ptr
;
Uint32
*
arr
=
(
Uint32
*
)
alloca
(
cnt
*
sizeof
(
Uint32
));
{
printf
(
" ; seize "
);
fflush
(
stdout
);
Uint64
sum
=
0
;
for
(
Uint32
i
=
0
;
i
<
loops
;
i
++
)
{
Uint64
start
=
NdbTick_CurrentMillisecond
();
for
(
Uint32
j
=
0
;
j
<
cnt
;
j
++
)
{
bool
b
=
pool
.
seize
(
ptr
);
arr
[
j
]
=
ptr
.
i
;
assert
(
b
);
}
Uint64
stop
=
NdbTick_CurrentMillisecond
();
for
(
Uint32
j
=
0
;
j
<
cnt
;
j
++
)
{
ptr
.
i
=
arr
[
j
];
pool
.
getPtr
(
ptr
);
pool
.
release
(
ptr
);
arr
[
j
]
=
RNIL
;
}
sum
+=
(
stop
-
start
);
if
(
i
==
0
)
printf
(
"; first ; %lld"
,
(
stop
-
start
));
}
printf
(
" ; avg ; %lld ; tot ; %lld"
,
sum
/
loops
,
sum
);
fflush
(
stdout
);
}
{
printf
(
" ; release "
);
fflush
(
stdout
);
Uint64
sum
=
0
;
for
(
Uint32
i
=
0
;
i
<
loops
;
i
++
)
{
for
(
Uint32
j
=
0
;
j
<
cnt
;
j
++
)
{
bool
b
=
pool
.
seize
(
ptr
);
arr
[
j
]
=
ptr
.
i
;
assert
(
b
);
}
Uint64
start
=
NdbTick_CurrentMillisecond
();
for
(
Uint32
j
=
0
;
j
<
cnt
;
j
++
)
{
ptr
.
i
=
arr
[
j
];
pool
.
release
(
ptr
);
arr
[
j
]
=
RNIL
;
}
Uint64
stop
=
NdbTick_CurrentMillisecond
();
sum
+=
(
stop
-
start
);
}
printf
(
"; avg ; %lld ; tot ; %lld"
,
sum
/
loops
,
sum
);
fflush
(
stdout
);
}
{
printf
(
" ; mix"
);
fflush
(
stdout
);
Uint64
sum
=
0
;
Uint64
start
=
NdbTick_CurrentMillisecond
();
for
(
Uint32
i
=
0
;
i
<
loops
*
cnt
;
i
++
)
{
int
pos
=
rand
()
%
cnt
;
ptr
.
i
=
arr
[
pos
];
if
(
ptr
.
i
==
RNIL
)
{
pool
.
seize
(
ptr
);
arr
[
pos
]
=
ptr
.
i
;
assert
(
ptr
.
i
!=
RNIL
);
}
else
{
pool
.
release
(
ptr
);
arr
[
pos
]
=
RNIL
;
}
}
Uint64
stop
=
NdbTick_CurrentMillisecond
();
for
(
Uint32
j
=
0
;
j
<
cnt
;
j
++
)
{
ptr
.
i
=
arr
[
j
];
if
(
ptr
.
i
!=
RNIL
)
{
pool
.
getPtr
(
ptr
);
pool
.
release
(
ptr
);
}
arr
[
j
]
=
RNIL
;
}
sum
+=
(
stop
-
start
);
printf
(
" ; %lld"
,
sum
);
fflush
(
stdout
);
}
{
printf
(
" ; getPtr"
);
fflush
(
stdout
);
for
(
Uint32
j
=
0
;
j
<
cnt
;
j
++
)
{
bool
b
=
pool
.
seize
(
ptr
);
arr
[
j
]
=
ptr
.
i
;
assert
(
b
);
}
Uint64
sum
=
0
;
Uint64
start
=
NdbTick_CurrentMillisecond
();
for
(
Uint32
i
=
0
;
i
<
loops
*
cnt
;
i
++
)
{
int
pos
=
rand
()
%
cnt
;
ptr
.
i
=
arr
[
pos
];
pool
.
getPtr
(
ptr
);
}
Uint64
stop
=
NdbTick_CurrentMillisecond
();
for
(
Uint32
j
=
0
;
j
<
cnt
;
j
++
)
{
ptr
.
i
=
arr
[
j
];
pool
.
getPtr
(
ptr
);
pool
.
release
(
ptr
);
arr
[
j
]
=
RNIL
;
}
sum
+=
(
stop
-
start
);
printf
(
" ; %lld"
,
sum
);
fflush
(
stdout
);
}
ndbout_c
(
""
);
}
template
<
Uint32
sz
>
struct
Rec
{
char
data
[
sz
-
4
];
Uint32
nextPool
;
};
typedef
Rec
<
32
>
Rec32
;
typedef
Rec
<
36
>
Rec36
;
typedef
Rec
<
256
>
Rec256
;
typedef
Rec
<
260
>
Rec260
;
Ndbd_mem_manager
mem
;
template
<
typename
T
>
inline
void
test_rp
(
Uint32
cnt
,
Uint32
loop
,
Uint32
pgsz
)
{
printf
(
"RP ; %d ; ws ; %d ; page ; %d"
,
sizeof
(
T
),
(
sizeof
(
T
)
*
cnt
)
>>
10
,
pgsz
>>
10
);
NdbdSuperPool
sp
(
mem
,
pgsz
,
19
);
GroupPool
gp
(
sp
);
sp
.
init_1
();
sp
.
init_2
();
sp
.
setInitPages
(
4
);
sp
.
setIncrPages
(
4
);
sp
.
setMaxPages
(
~
0
);
sp
.
allocMemory
();
RecordPool
<
T
>
pool
(
gp
);
test_pool
<
T
,
RecordPool
<
T
>
>
(
pool
,
cnt
,
loop
);
}
template
<
typename
T
>
inline
void
test_ap
(
Uint32
cnt
,
Uint32
loop
)
{
printf
(
"AP ; %d ; ws ; %d ; page ; n/a"
,
sizeof
(
T
),
(
cnt
*
sizeof
(
T
))
>>
10
);
ArrayPool
<
T
>
pool
;
test_pool
<
T
,
ArrayPool
<
T
>
>
(
pool
,
cnt
,
loop
);
}
int
main
(
int
argc
,
char
**
argv
)
{
mem
.
init
(
10000
);
Uint32
cnt
=
100
;
Uint32
loop
=
300000
;
while
(
cnt
<=
1000000
)
{
test_rp
<
Rec32
>
(
cnt
,
loop
,
8192
);
test_rp
<
Rec32
>
(
cnt
,
loop
,
32768
);
test_ap
<
Rec32
>
(
cnt
,
loop
);
test_rp
<
Rec36
>
(
cnt
,
loop
,
8192
);
test_rp
<
Rec36
>
(
cnt
,
loop
,
32768
);
test_ap
<
Rec36
>
(
cnt
,
loop
);
test_rp
<
Rec256
>
(
cnt
,
loop
,
8192
);
test_rp
<
Rec256
>
(
cnt
,
loop
,
32768
);
test_ap
<
Rec256
>
(
cnt
,
loop
);
test_rp
<
Rec260
>
(
cnt
,
loop
,
8192
);
test_rp
<
Rec260
>
(
cnt
,
loop
,
32768
);
test_ap
<
Rec260
>
(
cnt
,
loop
);
cnt
*=
100
;
loop
/=
100
;
}
}
void
ErrorReporter
::
handleAssert
(
const
char
*
msg
,
const
char
*
file
,
int
line
,
int
)
{
ndbout
<<
"ErrorReporter::handleAssert activated - "
<<
" line= "
<<
line
<<
endl
;
abort
();
}
storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp
View file @
5c20cae8
...
...
@@ -84,7 +84,7 @@ Ndbd_mem_manager::init(Uint32 pages)
release
(
start
+
1
,
end
-
1
-
start
);
}
return
0
;
return
true
;
}
void
...
...
@@ -200,6 +200,25 @@ Ndbd_mem_manager::alloc(Uint32* ret, Uint32 *pages, Uint32 min)
*
pages
=
0
;
}
void
*
Ndbd_mem_manager
::
alloc
(
Uint32
*
pages
,
Uint32
min
)
{
Uint32
ret
;
alloc
(
&
ret
,
pages
,
min
);
if
(
pages
)
{
return
m_base_page
+
ret
;
}
return
0
;
}
void
Ndbd_mem_manager
::
release
(
void
*
ptr
,
Uint32
cnt
)
{
Uint32
page
=
((
Alloc_page
*
)
ptr
)
-
m_base_page
;
release
(
page
,
cnt
);
}
void
Ndbd_mem_manager
::
insert_free_list
(
Uint32
start
,
Uint32
size
)
{
...
...
storage/ndb/src/kernel/vm/ndbd_malloc_impl.hpp
View file @
5c20cae8
...
...
@@ -64,8 +64,12 @@ public:
bool
grow
(
Uint32
pages
=
0
);
void
dump
()
const
;
private:
void
*
get_memroot
()
const
{
return
(
void
*
)
m_base_page
;}
void
*
alloc
(
Uint32
*
pages
,
Uint32
min_requested
);
void
release
(
void
*
ptr
,
Uint32
cnt
);
/**
* Compute 2log of size
* @note size = 0 -> 0
...
...
@@ -73,6 +77,7 @@ private:
*/
static
Uint32
log2
(
Uint32
size
);
private:
/**
* Return pointer to free page data on page
*/
...
...
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