Skip to content
This repository has been archived by the owner on Feb 20, 2021. It is now read-only.

Commit

Permalink
[Fix] Memory was not properly released at the end of the memory test.
Browse files Browse the repository at this point in the history
[Change] Hard-coded memory test loops changed from 50 to 5.
[Setup] Updated the release notes.
  • Loading branch information
enricogior committed Jul 15, 2015
1 parent 965b6e0 commit ee99b82
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
16 changes: 16 additions & 0 deletions Redis on Windows Release Notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ MSOpenTech Redis on Windows 2.8 Release Notes

- [Fix] deleting char** correctly (@zeliard)
- [Fix] Fork code for background processing fixes and code refactoring.
- [Fix] BeginForkOperation_Aof()/_Rdb()/_Socket() and BeginForkOperation() code
refactoring.
- [Fix] rewriteAppendOnlyFileBackground() code refactoring to minimize the code
changes for WIN32.
-[Fix] rewriteAppendOnlyFileBackground() must update the latency monitor, the
fork stats and replicationScriptCacheFlush().
- [Fix] rdbSaveBackground() code refactoring to minimize the code changes for
WIN32.
- [Fix] rdbSaveBackground() must update the latency monitor and the fork stats.
- [Fix] memory leak in rdbSaveToSlavesSockets().
- [Fix] properly releasing resources in rdbSaveToSlavesSockets().
- [Fix] QForkChildInit() not setting the operationFailed event in case of
exception.
- [Fix] QForkChildInit() AV in catch() statement.
- [Setup] Updated the scripts to create/push the NuGet/Chocolatey packages.
- [Setup] EventLog.dll excluded from NuGet package.
- [Fix] The stack trace was not logged when Redis is running as a service.
Expand All @@ -29,6 +43,8 @@ MSOpenTech Redis on Windows 2.8 Release Notes
- [Setup] Updated the release number and the release notes (2.8.2101).
- [Fix] Bug report fixes.
- [Setup] Nuget/Chocolatey packages update.
- [Fix] Memory was not properly released at the end of the memory test.
- [Change] Hard-coded memory test loops changed from 50 to 5.

--[ Redis on Windows 2.8.21 ] Release date: Jun 24 2015

Expand Down
4 changes: 4 additions & 0 deletions src/memtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,11 @@ void memtest_test(size_t megabytes, int passes) {
memtest_progress_end();
memtest_compare_times(m,bytes,pass,4);
}
#ifdef _WIN32
VirtualFreeEx(GetCurrentProcess(), m, 0, MEM_RELEASE);
#else
free(m);
#endif
}

void memtest_non_destructive_invert(void *addr, size_t size) {
Expand Down
2 changes: 1 addition & 1 deletion src/redis.c
Original file line number Diff line number Diff line change
Expand Up @@ -3449,7 +3449,7 @@ int main(int argc, char **argv) {
strcmp(argv[1], "-h") == 0) usage();
if (strcmp(argv[1], "--test-memory") == 0) {
if (argc == 3) {
memtest(atoi(argv[2]),50);
memtest(atoi(argv[2]),IF_WIN32(5,50));
exit(0);
} else {
fprintf(stderr,"Please specify the amount of memory to test in megabytes.\n");
Expand Down

0 comments on commit ee99b82

Please sign in to comment.