Skip to content

Commit

Permalink
1、新增共享内存的使用,可以将对象保存到共享内存,具体示例参考TestShm
Browse files Browse the repository at this point in the history
2、优化工程选项
  • Loading branch information
luotan-123 committed Jul 26, 2020
1 parent d7fc784 commit 2c4d4dd
Show file tree
Hide file tree
Showing 21 changed files with 1,276 additions and 78 deletions.
16 changes: 8 additions & 8 deletions linuxserverplatform/CenterServer/CenterServer.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<ClCompile>
<AdditionalIncludeDirectories>/usr/local/include/curl;/usr/local/include/DataBase;/usr/local/include/libevent;/usr/local/include/hiredis;/usr/local/include;$(RemoteRootDir)/Kernel/src/include/ServerCommon;$(RemoteRootDir)/Common/src/include/ServerCommon;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>/usr/local/include/curl;/usr/local/include/DataBase;/usr/local/include/libevent;/usr/local/include/hiredis;/usr/local/include;$(RemoteRootDir)/Kernel/src/include/ServerCommon;$(RemoteRootDir)/Common/src/include/ServerCommon;../src/include/ServerCommon;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<LibraryDependencies>pthread;Kernel;Common;event;jemalloc;</LibraryDependencies>
Expand All @@ -132,7 +132,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<ClCompile>
<AdditionalIncludeDirectories>/usr/local/include/curl;/usr/local/include/DataBase;/usr/local/include/libevent;/usr/local/include/hiredis;/usr/local/include;$(RemoteRootDir)/Kernel/src/include/ServerCommon;$(RemoteRootDir)/Common/src/include/ServerCommon;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>/usr/local/include/curl;/usr/local/include/DataBase;/usr/local/include/libevent;/usr/local/include/hiredis;/usr/local/include;$(RemoteRootDir)/Kernel/src/include/ServerCommon;$(RemoteRootDir)/Common/src/include/ServerCommon;../src/include/ServerCommon;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<LibraryDependencies>pthread;Kernel;Common;event;jemalloc;</LibraryDependencies>
Expand All @@ -144,7 +144,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<ClCompile>
<AdditionalIncludeDirectories>/usr/local/include/curl;/usr/local/include/DataBase;/usr/local/include/libevent;/usr/local/include/hiredis;/usr/local/include;$(RemoteRootDir)/Kernel/src/include/ServerCommon;$(RemoteRootDir)/Common/src/include/ServerCommon;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>/usr/local/include/curl;/usr/local/include/DataBase;/usr/local/include/libevent;/usr/local/include/hiredis;/usr/local/include;$(RemoteRootDir)/Kernel/src/include/ServerCommon;$(RemoteRootDir)/Common/src/include/ServerCommon;../src/include/ServerCommon;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<LibraryDependencies>pthread;Kernel;Common;event;jemalloc;</LibraryDependencies>
Expand All @@ -156,7 +156,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<ClCompile>
<AdditionalIncludeDirectories>/usr/local/include/curl;/usr/local/include/DataBase;/usr/local/include/libevent;/usr/local/include/hiredis;/usr/local/include;$(RemoteRootDir)/Kernel/src/include/ServerCommon;$(RemoteRootDir)/Common/src/include/ServerCommon;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>/usr/local/include/curl;/usr/local/include/DataBase;/usr/local/include/libevent;/usr/local/include/hiredis;/usr/local/include;$(RemoteRootDir)/Kernel/src/include/ServerCommon;$(RemoteRootDir)/Common/src/include/ServerCommon;../src/include/ServerCommon;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<LibraryDependencies>pthread;Kernel;Common;event;jemalloc;</LibraryDependencies>
Expand All @@ -168,7 +168,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<AdditionalIncludeDirectories>/usr/local/include/curl;/usr/local/include/DataBase;/usr/local/include/libevent;/usr/local/include/hiredis;/usr/local/include;$(RemoteRootDir)/Kernel/src/include/ServerCommon;$(RemoteRootDir)/Common/src/include/ServerCommon;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>/usr/local/include/curl;/usr/local/include/DataBase;/usr/local/include/libevent;/usr/local/include/hiredis;/usr/local/include;$(RemoteRootDir)/Kernel/src/include/ServerCommon;$(RemoteRootDir)/Common/src/include/ServerCommon;../src/include/ServerCommon;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<LibraryDependencies>pthread;Kernel;Common;event;jemalloc;</LibraryDependencies>
Expand All @@ -180,7 +180,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<AdditionalIncludeDirectories>/usr/local/include/curl;/usr/local/include/DataBase;/usr/local/include/libevent;/usr/local/include/hiredis;/usr/local/include;$(RemoteRootDir)/Kernel/src/include/ServerCommon;$(RemoteRootDir)/Common/src/include/ServerCommon;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>/usr/local/include/curl;/usr/local/include/DataBase;/usr/local/include/libevent;/usr/local/include/hiredis;/usr/local/include;$(RemoteRootDir)/Kernel/src/include/ServerCommon;$(RemoteRootDir)/Common/src/include/ServerCommon;../src/include/ServerCommon;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<LibraryDependencies>pthread;Kernel;Common;event;jemalloc;</LibraryDependencies>
Expand All @@ -192,7 +192,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
<ClCompile>
<AdditionalIncludeDirectories>/usr/local/include/curl;/usr/local/include/DataBase;/usr/local/include/libevent;/usr/local/include/hiredis;/usr/local/include;$(RemoteRootDir)/Kernel/src/include/ServerCommon;$(RemoteRootDir)/Common/src/include/ServerCommon;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>/usr/local/include/curl;/usr/local/include/DataBase;/usr/local/include/libevent;/usr/local/include/hiredis;/usr/local/include;$(RemoteRootDir)/Kernel/src/include/ServerCommon;$(RemoteRootDir)/Common/src/include/ServerCommon;../src/include/ServerCommon;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<LibraryDependencies>pthread;Kernel;Common;event;jemalloc;</LibraryDependencies>
Expand All @@ -204,7 +204,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x86'">
<ClCompile>
<AdditionalIncludeDirectories>/usr/local/include/curl;/usr/local/include/DataBase;/usr/local/include/libevent;/usr/local/include/hiredis;/usr/local/include;$(RemoteRootDir)/Kernel/src/include/ServerCommon;$(RemoteRootDir)/Common/src/include/ServerCommon;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>/usr/local/include/curl;/usr/local/include/DataBase;/usr/local/include/libevent;/usr/local/include/hiredis;/usr/local/include;$(RemoteRootDir)/Kernel/src/include/ServerCommon;$(RemoteRootDir)/Common/src/include/ServerCommon;../src/include/ServerCommon;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<LibraryDependencies>pthread;Kernel;Common;event;jemalloc;</LibraryDependencies>
Expand Down
16 changes: 8 additions & 8 deletions linuxserverplatform/Common/Common.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
</ItemGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<ClCompile>
<AdditionalIncludeDirectories>/usr/local/include/curl;/usr/local/include/DataBase;/usr/local/include/libevent;/usr/local/include/hiredis;/usr/local/include;$(RemoteRootDir)/Kernel/src/include/ServerCommon;$(RemoteProjectDir)/src/include/ServerCommon;$(RemoteRootDir)/Common/src/protobuf;$(RemoteRootDir)/Common/src/lua</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>/usr/local/include/curl;/usr/local/include/DataBase;/usr/local/include/libevent;/usr/local/include/hiredis;/usr/local/include;$(RemoteRootDir)/Kernel/src/include/ServerCommon;$(RemoteProjectDir)/src/include/ServerCommon;$(RemoteRootDir)/Common/src/protobuf;$(RemoteRootDir)/Common/src/lua;../src/include/ServerCommon;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>LUA_COMPAT_5_1;</PreprocessorDefinitions>
</ClCompile>
<Link>
Expand All @@ -211,7 +211,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<ClCompile>
<AdditionalIncludeDirectories>/usr/local/include/curl;/usr/local/include/DataBase;/usr/local/include/libevent;/usr/local/include/hiredis;/usr/local/include;$(RemoteRootDir)/Kernel/src/include/ServerCommon;$(RemoteProjectDir)/src/include/ServerCommon;$(RemoteRootDir)/Common/src/protobuf;$(RemoteRootDir)/Common/src/lua</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>/usr/local/include/curl;/usr/local/include/DataBase;/usr/local/include/libevent;/usr/local/include/hiredis;/usr/local/include;$(RemoteRootDir)/Kernel/src/include/ServerCommon;$(RemoteProjectDir)/src/include/ServerCommon;$(RemoteRootDir)/Common/src/protobuf;$(RemoteRootDir)/Common/src/lua;../src/include/ServerCommon;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;LUA_COMPAT_5_1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
Expand All @@ -237,7 +237,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<ClCompile>
<AdditionalIncludeDirectories>/usr/local/include/curl;/usr/local/include/DataBase;/usr/local/include/libevent;/usr/local/include/hiredis;/usr/local/include;$(RemoteRootDir)/Kernel/src/include/ServerCommon;$(RemoteProjectDir)/src/include/ServerCommon;$(RemoteRootDir)/Common/src/protobuf;$(RemoteRootDir)/Common/src/lua</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>/usr/local/include/curl;/usr/local/include/DataBase;/usr/local/include/libevent;/usr/local/include/hiredis;/usr/local/include;$(RemoteRootDir)/Kernel/src/include/ServerCommon;$(RemoteProjectDir)/src/include/ServerCommon;$(RemoteRootDir)/Common/src/protobuf;$(RemoteRootDir)/Common/src/lua;../src/include/ServerCommon;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>LUA_COMPAT_5_1;</PreprocessorDefinitions>
</ClCompile>
<Link>
Expand All @@ -263,7 +263,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<ClCompile>
<AdditionalIncludeDirectories>/usr/local/include/curl;/usr/local/include/DataBase;/usr/local/include/libevent;/usr/local/include/hiredis;/usr/local/include;$(RemoteRootDir)/Kernel/src/include/ServerCommon;$(RemoteProjectDir)/src/include/ServerCommon;$(RemoteRootDir)/Common/src/protobuf;$(RemoteRootDir)/Common/src/lua</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>/usr/local/include/curl;/usr/local/include/DataBase;/usr/local/include/libevent;/usr/local/include/hiredis;/usr/local/include;$(RemoteRootDir)/Kernel/src/include/ServerCommon;$(RemoteProjectDir)/src/include/ServerCommon;$(RemoteRootDir)/Common/src/protobuf;$(RemoteRootDir)/Common/src/lua;../src/include/ServerCommon;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;LUA_COMPAT_5_1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
Expand All @@ -289,7 +289,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<AdditionalIncludeDirectories>/usr/local/include/curl;/usr/local/include/DataBase;/usr/local/include/libevent;/usr/local/include/hiredis;/usr/local/include;$(RemoteRootDir)/Kernel/src/include/ServerCommon;$(RemoteProjectDir)/src/include/ServerCommon;$(RemoteRootDir)/Common/src/protobuf;$(RemoteRootDir)/Common/src/lua</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>/usr/local/include/curl;/usr/local/include/DataBase;/usr/local/include/libevent;/usr/local/include/hiredis;/usr/local/include;$(RemoteRootDir)/Kernel/src/include/ServerCommon;$(RemoteProjectDir)/src/include/ServerCommon;$(RemoteRootDir)/Common/src/protobuf;$(RemoteRootDir)/Common/src/lua;../src/include/ServerCommon;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>LUA_COMPAT_5_1;</PreprocessorDefinitions>
</ClCompile>
<Link>
Expand All @@ -315,7 +315,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<AdditionalIncludeDirectories>/usr/local/include/curl;/usr/local/include/DataBase;/usr/local/include/libevent;/usr/local/include/hiredis;/usr/local/include;$(RemoteRootDir)/Kernel/src/include/ServerCommon;$(RemoteProjectDir)/src/include/ServerCommon;$(RemoteRootDir)/Common/src/protobuf;$(RemoteRootDir)/Common/src/lua</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>/usr/local/include/curl;/usr/local/include/DataBase;/usr/local/include/libevent;/usr/local/include/hiredis;/usr/local/include;$(RemoteRootDir)/Kernel/src/include/ServerCommon;$(RemoteProjectDir)/src/include/ServerCommon;$(RemoteRootDir)/Common/src/protobuf;$(RemoteRootDir)/Common/src/lua;../src/include/ServerCommon;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;LUA_COMPAT_5_1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
Expand All @@ -341,7 +341,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
<ClCompile>
<AdditionalIncludeDirectories>/usr/local/include/curl;/usr/local/include/DataBase;/usr/local/include/libevent;/usr/local/include/hiredis;/usr/local/include;$(RemoteRootDir)/Kernel/src/include/ServerCommon;$(RemoteProjectDir)/src/include/ServerCommon;$(RemoteRootDir)/Common/src/protobuf;$(RemoteRootDir)/Common/src/lua</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>/usr/local/include/curl;/usr/local/include/DataBase;/usr/local/include/libevent;/usr/local/include/hiredis;/usr/local/include;$(RemoteRootDir)/Kernel/src/include/ServerCommon;$(RemoteProjectDir)/src/include/ServerCommon;$(RemoteRootDir)/Common/src/protobuf;$(RemoteRootDir)/Common/src/lua;../src/include/ServerCommon;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>LUA_COMPAT_5_1;</PreprocessorDefinitions>
</ClCompile>
<Link>
Expand All @@ -367,7 +367,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x86'">
<ClCompile>
<AdditionalIncludeDirectories>/usr/local/include/curl;/usr/local/include/DataBase;/usr/local/include/libevent;/usr/local/include/hiredis;/usr/local/include;$(RemoteRootDir)/Kernel/src/include/ServerCommon;$(RemoteProjectDir)/src/include/ServerCommon;$(RemoteRootDir)/Common/src/protobuf;$(RemoteRootDir)/Common/src/lua</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>/usr/local/include/curl;/usr/local/include/DataBase;/usr/local/include/libevent;/usr/local/include/hiredis;/usr/local/include;$(RemoteRootDir)/Kernel/src/include/ServerCommon;$(RemoteProjectDir)/src/include/ServerCommon;$(RemoteRootDir)/Common/src/protobuf;$(RemoteRootDir)/Common/src/lua;../src/include/ServerCommon;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;LUA_COMPAT_5_1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
Expand Down
3 changes: 1 addition & 2 deletions linuxserverplatform/Documentation/计划.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
新计划 2020/07/24:
项目修改(深度):
1、分配索引算法优化(多线程版)
2、新增消息队列限制字节数
3、异步输出日志
4、缓冲区改成循环缓冲区
4、GServerConnect和TcpConnect缓冲区改成循环缓冲区(暂定不改)
5、线程间通信,高速无锁通道(队列),tbus通道

编程任务(广度):
Expand Down
Loading

0 comments on commit 2c4d4dd

Please sign in to comment.