Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve memory management #359

Closed
gcode-importer opened this issue Jun 19, 2014 · 10 comments
Closed

improve memory management #359

gcode-importer opened this issue Jun 19, 2014 · 10 comments
Assignees

Comments

@gcode-importer
Copy link

Originally reported on Google Code with ID 359

This patch makes some small improvements to memory management:

1. replaced malloc/memset with calloc
2. removed memset after calloc - unnecessary re-settting of memory

Reported by boxerab on 2014-06-19 21:21:49

@gcode-importer
Copy link
Author

Reported by detonin on 2014-07-17 07:29:54

  • Status changed: Accepted
  • Labels added: Priority-High
  • Labels removed: Priority-Medium

@gcode-importer
Copy link
Author

Reported by mayeut on 2014-09-15 14:11:37

@gcode-importer
Copy link
Author

Aaron,

There's an error in the patch you submitted :
t1.c:1190
-memset(t1->flags,0,flagssize * sizeof(opj_flag_t));

This memset is still necessary.
Here's the new patch that has been verified against the test dataset

Reported by mayeut on 2014-09-15 15:51:19


- _Attachment: [calloc.patch](https://storage.googleapis.com/google-code-attachments/openjpeg/issue-359/comment-5/calloc.patch)_

@gcode-importer
Copy link
Author

Thanks. I had fixed this error, but had not updated the ticket.

You can find the latest version of my clean up here:

https://github.com/OpenJPEG/openjpeg/commit/07a891b4ec682b30394e8e5db5913e6b7580a2bf

Also, if you want to request corrections, do you mind making a github pull request
?

Reported by boxerab on 2014-09-15 20:47:59

@gcode-importer
Copy link
Author

calloc.patch verified on CDash : OK

The patch is in sync with github patch for calloc/memset.
There are some allocation checks added on github. I think they should be fixed with
Issue 355 which addresses these checks.

AAron, sorry about github but I haven't start using it (I know I should)...

Reported by mayeut on 2014-09-15 21:23:45

  • Status changed: Verified

@gcode-importer
Copy link
Author

Thanks, Matthieu. When you're ready, I think you will enjoy it.
Cheers,
Aaron

Reported by boxerab on 2014-09-16 02:20:25

@gcode-importer
Copy link
Author

patch can be safely applied

Reported by detonin on 2014-09-16 11:20:02

  • Status changed: Started

@gcode-importer
Copy link
Author

Reported by detonin on 2014-09-16 11:25:48

  • Labels added: verified

@gcode-importer
Copy link
Author

Reported by detonin on 2014-09-16 11:40:29

  • Status changed: Verified
  • Labels removed: verified

@gcode-importer
Copy link
Author

This issue was closed by revision r2879.

Reported by detonin on 2014-09-16 15:48:26

  • Status changed: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants