Skip to content

fix protobuf memory leak#11177

Merged
jacquesqiao merged 4 commits intoPaddlePaddle:developfrom
jacquesqiao:fix-proto-memory-leak
Jun 5, 2018
Merged

fix protobuf memory leak#11177
jacquesqiao merged 4 commits intoPaddlePaddle:developfrom
jacquesqiao:fix-proto-memory-leak

Conversation

@jacquesqiao
Copy link
Member

@jacquesqiao jacquesqiao commented Jun 5, 2018

fix: #11100

according to https://developers.google.com/protocol-buffers/docs/reference/arenas

ReleaseLast

SubMessageType* ReleaseLast(): Returns a heap-allocated message equivalent to the last message in the repeated field, removing it from the repeated field. If the repeated field itself has a NULL arena pointer (and thus, all of its pointed-to messages are heap-allocated), then this method simply returns a pointer to the original object. Otherwise, if the repeated field has a non-NULL arena pointer, this method makes a copy that is heap-allocated and returns that copy. In both cases, the caller receives ownership of a heap-allocated object and is responsible for deleting the object.

analyse

If the message is allocated in arena memory pool, this function will make a copy on heap and return the pointer, but no one will delete the pointer in our code.

@jacquesqiao jacquesqiao requested a review from reyoung June 5, 2018 03:49
@jacquesqiao jacquesqiao merged commit 2381249 into PaddlePaddle:develop Jun 5, 2018
jacquesqiao added a commit to jacquesqiao/Paddle that referenced this pull request Jun 5, 2018
panyx0718 added a commit that referenced this pull request Jun 5, 2018
xinyu009 added a commit that referenced this pull request Oct 12, 2019
* disable nccl test

* Update version.

* fix term core only

* fix transpiler error

* fix protobuf memory leak (#11177)

fix protobuf memory leak

* "change eigen mirror"

* refine en doc sequence enum pad expand mask d2s

* refine seq enum expand mask pad test=develop, test=document_fix

* remove cn char test=document_fix

* spec test=document_fix

* code style test=document_fix

* test=document_fix

* test=document_fix

* test=document_fix

* test=document_fix

* test=document_fix

* test=document_fix
xinyu009 added a commit to xinyu009/Paddle that referenced this pull request Oct 12, 2019
* disable nccl test

* Update version.

* fix term core only

* fix transpiler error

* fix protobuf memory leak (PaddlePaddle#11177)

fix protobuf memory leak

* "change eigen mirror"

* refine en doc sequence enum pad expand mask d2s

* refine seq enum expand mask pad test=develop, test=document_fix

* remove cn char test=document_fix

* spec test=document_fix

* code style test=document_fix

* test=document_fix

* test=document_fix

* test=document_fix

* test=document_fix

* test=document_fix

* test=document_fix
xinyu009 added a commit that referenced this pull request Oct 15, 2019
* disable nccl test

* Update version.

* fix term core only

* fix transpiler error

* fix protobuf memory leak (#11177)

fix protobuf memory leak

* "change eigen mirror"

* test=document_fix

* test=document_fix
seiriosPlus pushed a commit to seiriosPlus/Paddle that referenced this pull request Dec 9, 2019
* disable nccl test

* Update version.

* fix term core only

* fix transpiler error

* fix protobuf memory leak (PaddlePaddle#11177)

fix protobuf memory leak

* "change eigen mirror"

* refine en doc sequence enum pad expand mask d2s

* refine seq enum expand mask pad test=develop, test=document_fix

* remove cn char test=document_fix

* spec test=document_fix

* code style test=document_fix

* test=document_fix

* test=document_fix

* test=document_fix

* test=document_fix

* test=document_fix

* test=document_fix
seiriosPlus pushed a commit to seiriosPlus/Paddle that referenced this pull request Dec 9, 2019
* disable nccl test

* Update version.

* fix term core only

* fix transpiler error

* fix protobuf memory leak (PaddlePaddle#11177)

fix protobuf memory leak

* "change eigen mirror"

* refine en doc sequence enum pad expand mask d2s

* refine seq enum expand mask pad test=develop, test=document_fix

* remove cn char test=document_fix

* spec test=document_fix

* code style test=document_fix

* test=document_fix

* test=document_fix

* test=document_fix

* test=document_fix

* test=document_fix

* test=document_fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants