Merged
Conversation
Member
Author
|
@ajblane Could you help review and test the FPGA implementation? Thanks. |
jserv
reviewed
Sep 16, 2018
src/pow_avx.c
Outdated
|
|
||
| PoW_AVX_Context *ctx = (PoW_AVX_Context *) malloc(sizeof(PoW_AVX_Context) * impl_ctx->num_max_thread); | ||
| if (!ctx) return false; | ||
| if(!ctx) return false; |
Member
There was a problem hiding this comment.
Change style back to the original.
jserv
reviewed
Sep 16, 2018
src/pow_c.c
Outdated
| nonce_to_result(trytes_t, nonce, ctx->output_trytes); | ||
| nonce_to_result(tx_tryte, nonce_tryte, ctx->output_trytes); | ||
|
|
||
| leave: |
Member
There was a problem hiding this comment.
leave might be inconsistent. Change it to something like fail, bail, etc.
jserv
reviewed
Sep 16, 2018
src/pow_c.c
Outdated
| static bool PoWC_Context_Initialize(ImplContext *impl_ctx) | ||
| { | ||
| int nproc = get_avail_nprocs(); | ||
| if(impl_ctx->num_max_thread <= 0 || nproc <= 0) return false; |
jserv
reviewed
Sep 16, 2018
src/pow_c.c
Outdated
|
|
||
| PoW_C_Context *ctx = (PoW_C_Context *) malloc(sizeof(PoW_C_Context) * impl_ctx->num_max_thread); | ||
| if (!ctx) return false; | ||
| if(!ctx) return false; |
jserv
reviewed
Sep 16, 2018
src/pow_cl.c
Outdated
| freeTrobject(trytes_t); | ||
| freeTrobject(last); | ||
| /* hack */ | ||
| leave: |
5c4f4f7 to
0544e57
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The potential memory leak is induced by the improper handling exception in each PoW implementation.